I'm using angular2, typescript and therefore include this package.
I hit an issue where the DOM definitions in typescript appear to have changed, in a breaking way. So typescript now (I'm currently using 2.3.2) uses SVGGraphicsElement as a base class for say getBBox(). But the older 2.0.0 version used SVGLocatable.
The problem is that other tools including Webstorm are expecting SVGGraphicsElement and I get errors.
In this specific case, I can easily work-around this inconsistency and use an 'any' type, but the more general issue is that typescript is advancing at quite a rate, and being tied to the version included in this package is going to become a significant issue.
I discovered it by trying to find where SVGLocatable is declared, and the result was:
./.meteor/local/build/programs/server/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/lib.d.ts plus the dom.d.ts etc.
So the question is how can I avoid using these definitions, and rely in the typescript version I have in node_modules/typescript?
I have a single tsconfig.json config file at the top:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"removeComments": false,
"noImplicitAny": false,
"sourceMap": true
},
"exclude": [
".meteor"
]
}
I'm not sure the 'exclude' is really doing anything.
I also added a libs entry to try to explicitly specify libraries ("lib": [ "es2015", "dom" ],) but that didn't make any difference.
I also tried using "typeRoots" : ["./node_modules/@types"] to prevent searching for type definitions, but no difference there either.
Any ideas?
I'm using angular2, typescript and therefore include this package.
I hit an issue where the DOM definitions in typescript appear to have changed, in a breaking way. So typescript now (I'm currently using 2.3.2) uses SVGGraphicsElement as a base class for say getBBox(). But the older 2.0.0 version used SVGLocatable.
The problem is that other tools including Webstorm are expecting SVGGraphicsElement and I get errors.
In this specific case, I can easily work-around this inconsistency and use an 'any' type, but the more general issue is that typescript is advancing at quite a rate, and being tied to the version included in this package is going to become a significant issue.
I discovered it by trying to find where SVGLocatable is declared, and the result was:
./.meteor/local/build/programs/server/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/lib.d.tsplus the dom.d.ts etc.So the question is how can I avoid using these definitions, and rely in the typescript version I have in node_modules/typescript?
I have a single tsconfig.json config file at the top:
I'm not sure the 'exclude' is really doing anything.
I also added a libs entry to try to explicitly specify libraries (
"lib": [ "es2015", "dom" ],) but that didn't make any difference.I also tried using
"typeRoots" : ["./node_modules/@types"]to prevent searching for type definitions, but no difference there either.Any ideas?