Skip to content

Commit

Permalink
docs(demo-apps): add missing type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrowhurstram committed Oct 24, 2016
1 parent b256f59 commit 064629d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion demo-apps/ts-webpack/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
src/**/*.js
src/**/*.js.map
src/**/*.d.ts
!src/global.d.ts
!src/type-declarations/*.d.ts
4 changes: 4 additions & 0 deletions demo-apps/ts-webpack/src/type-declarations/angular-route.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '@types/angular-route' {
import mod = angular.route;
export = mod;
}
7 changes: 7 additions & 0 deletions demo-apps/ts-webpack/src/type-declarations/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// fake the nodejs require function so that we can add 'require' calls for html files;
// these calls to 'require' will then be converted by webpack ngtemplate-loader
// note that I would have prefered to use standard es2015 import for these
// html files but that would have meant using typescript 2 feature of implicit
// ambient modules which in turn would have meant turning off noImplicitAny checks
// which is a VERY bad idea
declare function require(path: string): any;

0 comments on commit 064629d

Please sign in to comment.