You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And for **module kind is UMD** compiler should use relevant rule for each block.
264
+
254
265
### Frontend
255
-
- Report error when try to use native declaration which has `JsModule` annotations, but no one specifies a rule for current module kind.
256
-
- Prohibit to have many annotations which explicitly provide the same module kind.
257
266
- Prohibit to apply `JsModule` annotation to non-native declarations, except files.<br/>
258
267
It can be relaxed later e.g. to reuse this annotation to allow translate a file to separate JS module,
259
268
it can be useful to interop with some frameworks (see [KT-12093](https://youtrack.jetbrains.com/issue/KT-12093))
260
269
261
270
### IDE
262
-
- Add inspection for the case when some declarations with the same fq-
271
+
- Add inspection for the case when some declarations with the same fq-name
263
272
Consider next cases:
264
273
- function overloads
265
274
- package and functions
266
275
267
276
## Open questions
268
277
1. Can we introduce default value for `import` parameter of `JsModule` and use the name of declaration as import string when argument not provided?<br/>
269
278
If so, how it should work when the annotation used on file?
270
-
271
-
2. What should be used as default value of `kind` parameter of `JsModule`?
272
-
1. all kinds
273
-
2. all kinds except SIMPLE
274
-
275
-
In TypeScript (external) modules can be used only when compiler ran with module kind (in our terms it's all except SIMPLE).
276
-
So, should the second be default to generate simpler code from TS declarations?
277
-
278
-
3. Actually, right now we needs to know only is `kind === SIMPLE` or not, so should we simplify API?
279
-
280
-
4. Unfortunately, we can't use constants for `kind` parameter to make API better. Can we fix it somehow?
281
-
282
-
5. Will be nice to have the way to say that all declarations in this file are native. But how it fit with the idea to replace `@native` with `external`?
0 commit comments