|
|
I know it seems like a bad idea to do, but I want to alter the lib.d.ts to provide intellisense for some features not present in the default definition file. I don't want to require my users to manually reference my declaration. Is the lib.d.ts that the
TypeScript extension visible? Neither the npm one nor the one in C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.8.1.1 is doing the trick.
Is this possible?
|
|
|
|
I am unclear about what you are trying to achieve. Can you explain a little bit more?
|
|
|
|
You have to patch the resource from the addin at runtime.
On Thu, Jan 10, 2013 at 4:32 PM, choudeshell <notifications@codeplex.com> wrote:
From: choudeshell
I am unclear about what you are trying to achieve. Can you explain a little bit more?
|
|
|
|
To explain very simply, I want to alter the base declaration lib.d.ts that is distributed w/ the extension to incorporate some other changes that can be used by the user with intellisense but does not need to be explicitly ///<reference'd. I was thinking
about altering the language service DLL directly and changing the string resource inside of it, but the extension has an anti-extensible type of license which scares me. This all makes me very sad for something I was hoping was more open.
|
|
|
|
Lib.d.ts carries an Apache 2.0 licence - so you can modify it and distribute it. http://typescript.codeplex.com/SourceControl/changeset/view/fe3bc0bfce1f#typings/lib.d.ts
That said, I would not do this. You as the author of these modifications would need to keep pace with TypeScript releases or force your users to use an older version of TypeScript, compatible with your modifications.
|
|
Coordinator
Jan 10 at 5:11 PM
|
We've put some work recently into making it easier to swap out the language service and lib.d.ts for the language service. The fixes should be showing up in the next release, 0.8.2, which is coming out in a couple weeks.
|
|
|
|
Now that 0.8.2's out, I'd like to bring this up again. I noticed in the blog post saying I could swap out the language service (and the default lib), but I am struggling to find where I can do this. Altering the lib.d.ts in the SDK still does not persist.
And I cannot find where I can interchange the language service. Can you give some more info here? I see I can likely alter the .targets MSBuild files to change the tsc execution parameters but that's it. Any hints?
|
|
|
|
Apologies for the grave digging, but I feel this issue needs further clarification.
I'm working on a preprocessor, which would add some syntax to TypeScript (namely the ability to #define keywords), and I would like VS not to flag errors for defined names (since, without the changes, they'd result in syntax errors or, at the very least, undefined symbols).
Is it finally possible to replace the language service by swapping out TypeScript.js and tsc.js in the SDK folder?
|
|