-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Description
Commands I used:
ng new test
npm i --save vss-web-extension-sdk
After that I added into tsconfig.json:
"types": [ "vss-web-extension-sdk" ]
and updated angular.json with:
"scripts": [ "node_modules/vss-web-extension-sdk/lib/VSS.SDK.js" ]
per documentation at https://angular.io/guide/using-libraries#library-typings and https://angular.io/guide/typescript-configuration#typescript-typings that's all I have to do to make it work. So I just add usage like VSS.init({}); into app.component.ts. But when I build it with
ng build
I'm facing an error:
src/app/app.component.ts:11:5 - error TS2304: Cannot find name 'VSS'.
11 VSS.init({});
I see that type definitions are presented in the module but ignored buy builder. I believe it's relaged to the ambient module declaration within vss-web-extension-sdk but not sure about that.
Angular CLI: 9.1.3
Node: 10.16.0
OS: win32 x64
Metadata
Metadata
Assignees
Labels
No labels