How much of Typescript is actually supported? #1689
Replies: 3 comments 1 reply
-
|
The Static Hermes typed language is under heavy development. There is no definitive list of what is supported or isn't, and supported features are likely to change frequently. Additionally some features of TypeScript are fundamentally incompatible with a performant sound static typing system and can never be supported. TypeScript support was contributed by Amazon and is achieved through transpilation from TypeScript to Flow (since Flow is more constrained) and some TS features may still be missing: https://github.com/facebook/hermes/blob/static_h/lib/AST/TS2Flow.cpp For now it is "use at your own risk" and "don't assume a feature is supported". |
Beta Was this translation helpful? Give feedback.
-
|
We will add some documentation in the coming weeks. |
Beta Was this translation helpful? Give feedback.
-
|
@tmikov Are the forEach and map functions supposed to be recognised? ft: unknown array property when calling forEach and map on a number [ ] array. Also Map isn't recognised, and neither is Record. Am I supposed to link to something or are these just not recognised? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I just got this error from shermes:
error: ft: indexers are not supported in object types
var LIMIT_STRINGS: { [key: string]: string } = { };
Should it not be expected that Typescript syntax will work generally? Or is it just this feature?
Edit: Also:
"Typing of pattern parameters"? This one is just a warning, not an error like the indexers error.
Beta Was this translation helpful? Give feedback.
All reactions