awesome-typescript-loader
Version:
Awesome TS loader for webpack
30 lines (26 loc) • 535 B
text/typescript
import { src, webpackConfig, tsconfig, compile, checkOutput, expectErrors, spec } from './utils'
spec(__filename, async function() {
src(
'index.ts',
`
class HiThere {
constructor(a: number, b: string) {
const t = a + b;
}
}
`
)
tsconfig()
let stats = await compile(webpackConfig())
expectErrors(stats, 0)
checkOutput(
'index.js',
`
class HiThere {
constructor(a, b) {
const t = a + b;
}
}
`
)
})