Skip to content

Commit ac6dc67

Browse files
committed
chore(typings): fix travis build
1 parent cd0a96a commit ac6dc67

File tree

5 files changed

+9
-34
lines changed

5 files changed

+9
-34
lines changed

src/transpiler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function transpile(
4848
}
4949

5050
function getTranspileOptions(options: ts.CompilerOptions): ts.CompilerOptions {
51-
const result = (<any>ts).clone(options)
51+
const result = (<any>ts).clone(options) as ts.CompilerOptions;
5252

5353
result.isolatedModules = true
5454

src/types.d.ts

+2-23
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,19 @@ interface Module {
55
metadata?: any
66
}
77

8-
// augment SystemJS
9-
declare namespace SystemJSLoader {
10-
interface System {
11-
normalize(dep: string, parent?: string): Promise<string>
12-
resolve(dep: string, parent?: string): Promise<string>
13-
typescriptOptions?: PluginOptions
14-
}
15-
}
16-
17-
declare var self: any
18-
19-
declare type FetchFunction = (fileName: string, parentAddress: string) => Promise<string>
8+
type FetchFunction = (fileName: string, parentAddress: string) => Promise<string>
209

2110
interface PluginOptions {
2211
tsconfig?: boolean | string
23-
24-
/* reveal some hidden typescript options */
25-
suppressOutputPathCheck?: boolean
26-
allowNonTsExtensions?: boolean
2712
}
2813

29-
declare interface StructuredError {
14+
interface StructuredError {
3015
messageText: string
3116
locationText: string
3217
errorCode: number
3318
category: number
3419
}
3520

36-
declare module Chai {
37-
interface Assertion {
38-
defined: any
39-
}
40-
}
41-
4221
declare module "jspm" {
4322
export const Builder: any
4423
}

test/builder-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import chai = require('chai')
22
import chaiAsPromised = require('chai-as-promised')
33
import ts from 'typescript'
44
import { Builder } from 'jspm'
5+
import { Config } from 'systemjs'
56

67
chai.use(chaiAsPromised)
78
const should = chai.should()
@@ -12,7 +13,7 @@ describe('Builder', () => {
1213
reset(): void
1314
bundle(bundleSpec: string, options?: object): Promise<{source: string}>
1415
buildStatic(bundleSpec: string, options?: object): Promise<{source: string}>
15-
config<T extends SystemJSLoader.Config | {transpiler}>(config?: T): void
16+
config<T extends Config | {transpiler}>(config?: T): void
1617
}
1718

1819
let builder: Builder = null

test/tsconfig.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@
1212
"moduleResolution": "node",
1313
"allowSyntheticDefaultImports": true
1414
},
15-
"files": [
16-
"../src/types.d.ts"
17-
]
18-
}
15+
"include": ["./*.ts", "../src/types.d.ts"]
16+
}

tsconfig.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"outDir": "tmp/es6",
4-
"lib": ["es5", "es2015.promise", "es2015.collection"],
4+
"lib": ["es5", "es2015.promise", "es2015.collection", "dom"],
55
"target": "es5",
66
"module": "es2015",
77
"removeComments": true,
@@ -14,8 +14,5 @@
1414
"noImplicitThis": false,
1515
"noFallthroughCasesInSwitch": true
1616
},
17-
"files": [
18-
"./src/plugin.ts",
19-
"./src/types.d.ts"
20-
]
17+
"include": ["./src"]
2118
}

0 commit comments

Comments
 (0)