Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 6bad4cb

Browse files
committed
chore: add TS typings to project manually
See typings/README.md for info on why these are checked in.
1 parent 4c32508 commit 6bad4cb

File tree

11 files changed

+1599
-5
lines changed

11 files changed

+1599
-5
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"systemjs": "^0.19.6",
3838
"systemjs-builder": "^0.14.11",
3939
"ts-node": "^0.5.4",
40+
"tsd": "^0.6.5",
4041
"typescript": "^1.7.3",
4142
"typescript-node": "^0.1.3"
4243
}

src/main-server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference path="../typings/tsd.d.ts" />
2+
13
import * as path from 'path';
24
import * as express from 'express';
35
import {SERVER_LOCATION_PROVIDERS, ng2engine} from 'angular2-universal-preview/dist/server';

src/services/Backend.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import Firebase from 'firebase';
1+
/// <reference path="../../typings/tsd.d.ts" />
2+
3+
import * as Firebase from 'firebase';
24
import {Injectable} from 'angular2/core';
35
import {Observable} from 'rxjs/Observable';
46
import {ReplaySubject} from 'rxjs/subject/ReplaySubject';
@@ -21,7 +23,6 @@ export class Backend {
2123
}
2224
authenticate(){
2325
let authRequest = new Observable(obs => {
24-
2526
this.ref.authWithOAuthPopup('github', (err, res) => {
2627
if(err){
2728
obs.error(err);

tsconfig.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44
"target": "es5",
55
"noImplicitAny": false,
66
"outDir": "build",
7-
"rootDir": ".",
7+
"rootDir": "src",
88
"sourceMap": false,
99
"emitDecoratorMetadata": true,
1010
"experimentalDecorators": true,
11-
"moduleResolution": "node"
11+
"moduleResolution": "node",
12+
"noResolve": false
1213
},
14+
"files": [
15+
"src/main.ts",
16+
"src/main-server.ts"
17+
],
1318
"exclude": [
14-
"node_modules"
19+
"node_modules/"
1520
]
1621
}

tsd.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": "v4",
3+
"repo": "borisyankov/DefinitelyTyped",
4+
"ref": "master",
5+
"path": "typings",
6+
"bundle": "typings/tsd.d.ts",
7+
"installed": {
8+
"firebase/firebase.d.ts": {
9+
"commit": "2cad4a3cff770c37b40496188c246b1a60e87e2d"
10+
},
11+
"mime/mime.d.ts": {
12+
"commit": "2cad4a3cff770c37b40496188c246b1a60e87e2d"
13+
},
14+
"serve-static/serve-static.d.ts": {
15+
"commit": "2cad4a3cff770c37b40496188c246b1a60e87e2d"
16+
},
17+
"express/express.d.ts": {
18+
"commit": "2cad4a3cff770c37b40496188c246b1a60e87e2d"
19+
}
20+
}
21+
}

typings/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Eventually typings should not be included in version control.
2+
3+
Right now they must be, because the installed typings have to
4+
be manually updated to prevent duplication with node.d.ts typings
5+
included with angular2.
6+
7+
Local edits: remove reference to node.d.ts from express.d.ts.
8+
9+
(@jeffbcross 2016-01-21)

0 commit comments

Comments
 (0)