-
Notifications
You must be signed in to change notification settings - Fork 7
Typescript source/definitions issues #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
tl;dr: Add Please don't close this issue. I'll do it when this is added to the documentation. I want to double check everything first before sticking it in there though. Explanation: So, in an ideal world, when publishing a library, you build definition files (.d.ts), and then when consumers of that library use it with tsc, it will use those to type-check their code. I've tried to get these working in the past, but faced issues. The first is that in order to use definitions, the The second, even more glaring issue, is that tsc blows up when you try to build definitions for mixins, for whatever reason. Because of this, the The first issue looks like it's been resolved with TS 3.0.0, although I'm not sure how the build performance will compare; if the second issue isn't resolved though it won't really matter anyway. |
Ok, make sense. I think that I tried but there's more conflicts, one is
related with Jsx other is a missmatch in a type due an init function.
I think that maybe we need a new approach to publish only type definitions.
Like declare somewhere this list of packages and their dependencies and
peek free or resolved ones first.
|
I forked and tried to use the typescript compile API to solve that, it still needs some work. |
@nmocruz I'd definitely prefer to only publish type definitions, I just haven't been able to do it successfully without making the build take a loooooong time. I'm hoping project compilation w/ TS 3.0.0 will fix this. |
Process all that packages will take some time, looking the Compiler API
there's something related with incremental build, not sure if will speed up
or not individual packages significantly.
|
@nmocruz I'm under the impression this is all working? Can you review this documentation to confirm that it covers everything? |
@caseyWebb I thought everything was sorted but it's the I had the transpileOnly mode actived and was hiding some errors, related with typescript. I really recommend to get a way to pusblish .d.ts files so they don't conflict with ts on the package consumer.
as a said is not elegant, and we dont know if the TS4094 stuff will be fixed soon. |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I was trying to include this library in a typescript project, but maybe I'm missing something in my tsconfig.json because it starts to check source code in this module inside node_modules even excluding "node_modules". maybe is a noobie question about typescript, or it can be done something to improve here, because it tries to check ts files under node_modules/@profiscience/knockout-contrib-* using my tsconfig.json.
I'm using webpack and awesome-typescript-loader, maybe is required to do something here?
The text was updated successfully, but these errors were encountered: