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
At the moment we are shipping hand-written .d.ts files for the generators which are pretty deficient. For example, javacript.d.ts (copied into the package from typings/javascript.d.ts) is essentially:
Note that javascriptGenerator is declared as any, and JavascriptGenerator is not declared at all.
This means that developers using generators from TypeScript are not getting the full benefit of TS's type checking of the generator classes / instances.
Proposed Solution
Publish the .d.ts files produced by tsc instead of these handwritten versions.
Decide on what form the generator typings should be published in.
Modify build_tasks.js and package_tasks.js accordingly.
Remove unused files from typings/*.js.
Discussion
Should we publish individual .d.ts files in dist/generators/**/*.d.ts (as we do for files in core), with a wrapper that just imports them, or should we try to publish a single file per chunk that rolls these up?
There may be some difficult in publishing a roll up as it will need to reference CodeGenerator, which is currently defined in core/.
Problem
At the moment we are shipping hand-written
.d.ts
files for the generators which are pretty deficient. For example,javacript.d.ts
(copied into the package fromtypings/javascript.d.ts
) is essentially:Note that
javascriptGenerator
is declared asany
, andJavascriptGenerator
is not declared at all.This means that developers using generators from TypeScript are not getting the full benefit of TS's type checking of the generator classes / instances.
Proposed Solution
Publish the
.d.ts
files produced bytsc
instead of these handwritten versions.blocks/
andgenerators/
to TypeScript #6828build_tasks.js
andpackage_tasks.js
accordingly.typings/*.js
.Discussion
.d.ts
files indist/generators/**/*.d.ts
(as we do for files in core), with a wrapper that just imports them, or should we try to publish a single file per chunk that rolls these up?CodeGenerator
, which is currently defined incore/
.See also #5818.
The text was updated successfully, but these errors were encountered: