4 ms·
Ah right, the `import * as` problem. That was fixed with --allowSyntheticDefaultImports. According to the docs: > Allow default imports from modules with no de
by sbjs 8y ago
Ah right, the `import * as` problem. That was fixed with --allowSyntheticDefaultImports. According to the docs:
> Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
https://www.typescriptlang.org/docs/handbook/compiler-options.html https://www.typescriptlang.org/docs/handbook/compiler-option...
And I think you're right about decorators. They are an iffy concept in the context of JS semantics, and I personally avoid using them and try to avoid libraries that use them. That's probably why TS has them disabled by default and calls them "experimental". I like the concept of decorators in and of themselves, but they don't fit cleanly into the JS world, and I am looking forward to seeing how the JS/TS world innovates alternative "cleaner" solutions that fit better into the existing model!
- xanderjanz 8y agoWe have high order functions in JS. Which are similar to decorators.
- sbjs 8y agoSimilar, but harder to use safely and correctly in class methods using the new class syntax. There's more surface area for typos and other mismatch errors since you have to type the method names twice. See: https://mobx.js.org/best/decorators.html https://mobx.js.org/best/decorators.html