function foo() {
let someProperty;
// Some other initialization code
function someMethod() {
// Do some stuff with `someProperty`
// And potentially other things
}
// Maybe some other methods
return {
someMethod,
// Maybe some other methods
};
}
let someProperty;
function foo() {
// Some initialization code
}
foo(); // some initialization code
someProperty = 123; // some more initialization
// Some utility function not exported
// later
export function someMethod() {
}
class Foo {
public someProperty;
constructor() {
// some initialization
}
public someMethod() {
// some code
}
private someUtility() {
// some code
}
}
export = new Foo();