Repository navigation
v0.1.31
0.1.31
-
TypeScript language support (parse, run, translate):
- New language at
lib/src/languages/typescript/ts/:ApolloParserTypeScript,
TypeScriptGrammarDefinition,TypeScriptGrammarLexer,
ApolloCodeGeneratorTypeScript,ApolloRunnerTypeScript. - Superset of JavaScript: all JS features plus type annotations on
variables, parameters, return types and class fields
(number/string/boolean/any/void,T[]/Array<T>), interfaces,
enums, and access modifiers (public/private/protected/readonly/
static/abstract). - Code generation emits idiomatic TypeScript (type annotations,
interface,
enum,abstract class, member modifiers) and erases types cleanly when
targeting JavaScript. - Registered
'typescript'/'ts'in the parser/runner/generator factories and
the.tsfile-extension mapping; CLIapollovm run/translatesupport.ts. - Tests: TypeScript test definitions under
test/tests_definitions/plus the
test/hello_world.tsfixture andexample/apollovm_example_typescript.dart.
- New language at
-
Generalized class/member modeling in the shared AST (used by Dart and TypeScript):
ASTModifiers: addedisAbstractandisProtected(andmodifierAbstract).ASTClassNormal: addedkind(ASTClassKind.normalClass/abstractClass/
interface), plus optionalsuperClassNameandimplementsTypes.- New
ASTClassEnum(extendsASTClassNormal) withASTEnumEntryentries. ASTClassField: added amodifiersfield (e.g.static/private/readonly).- Dart now parses and generates
abstract class,enum,extends/implements,
abstract (body-less) methods, andstaticfields; these cross-translate
between Dart, TypeScript and JavaScript.