teambit / bit.envs

DEPRECATED - Bit compilers and testers were moved to https://github.com/teambit/envs
https://bit.dev/bit/envs
Other
23 stars 9 forks source link

typescript compiler - add declaration to compiler #4

Closed nampdn closed 5 years ago

nampdn commented 6 years ago

It's useless if we export a compiled typescript module without the .d.ts file. So I added the declaration property to true. This is very handy, it would be great if we could read the compilerOptions from root project tsconfig.json file.

tomlandau commented 6 years ago

Thanks :) Actually, we're currently working on that exact feature - environments that will use the root project's configuration.

GiladShoham commented 6 years ago

@nampdn Thanks for this PR, but I don't think it will work with this change. see here some references: generate-definitions-d-ts-with-transpilemodule Emit Declarations when using transpileModule() According to this, you will have to use createProgram as describe here - Using-the-Compiler-API#a-minimal-compiler