Why is tslint:recommended not allowing modules?

前端 未结 1 1187
难免孤独
难免孤独 2020-12-30 21:41

We are using typescript v2.3.2 and TSLint v4.5.1 with VS Code to create a SPA. Codebase is growing and we need to modularize it someway.

I tried to do the modulariza

1条回答
  •  一整个雨季
    2020-12-30 22:02

    [tslint] 'namespace' and 'module' are disallowed (no-namespace)

    Because the are not standard JavaScript syntax.

    More

    • Namespace is a special TypeScript only syntax for a common JS pattern : https://basarat.gitbook.io/typescript/docs/project/namespaces.html
    • Do not use namespaces with outFile : https://basarat.gitbook.io/typescript/docs/tips/outFile.html

    0 讨论(0)
提交回复
热议问题