There was an error while loading. Please reload this page.
1 parent b628b81 commit a179a8cCopy full SHA for a179a8c
docs/tips/singleton.md
@@ -35,3 +35,16 @@ Singleton.someMethod();
35
```
36
37
> Warning : Singleton is just a fancy name for [global](http://stackoverflow.com/a/142450/390330)
38
+
39
+For most projects `namespace` can additional be replaced by a *module*.
40
41
+```ts
42
+// someFile.ts
43
+// ... any one time initialization goes here ...
44
+export function someMethod() { }
45
46
+// Usage
47
+import {someMethod} from "./someFile";
48
+```
49
50
0 commit comments