Skip to content

Commit

Permalink
#161: TS1086: An accessor cannot be declared in an ambient context.
Browse files Browse the repository at this point in the history
- Upgrade to Typescript 3.7.4 + workarounds
- angularCompilerOptions.disableTypeScriptVersionCheck=true
- added polyfills.ts: __importDefault
  • Loading branch information
makimenko committed Dec 27, 2019
1 parent 80df914 commit d319384
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
12 changes: 9 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
"tsickle": "^0.37.1",
"tslib": "^1.10.0",
"tslint": "^5.20.1",
"typescript": "3.5.3"
"typescript": "3.7.4"
}
}
2 changes: 1 addition & 1 deletion projects/atft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"peerDependencies": {
"@angular/common": "^8.2.2",
"@angular/core": "^8.2.2",
"three": "^0.110.0"
"three": "^0.112.0"
},
"dependencies": {},
"engines": {
Expand Down
3 changes: 2 additions & 1 deletion projects/atft/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true
"enableResourceInlining": true,
"disableTypeScriptVersionCheck": true
},
"exclude": [
"src/test.ts",
Expand Down
6 changes: 6 additions & 0 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

// TODO: Remove when Angular will support typescript 3.7+
// @ts-ignore
window.__importDefault = function(mod) {
return mod && mod.__esModule ? mod : { default: mod };
};
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@
"node_modules/core-js/proposals/reflect-metadata"
]
}
},
"angularCompilerOptions": {
"disableTypeScriptVersionCheck": true
}
}

0 comments on commit d319384

Please sign in to comment.