Files
DefinitelyTyped/webpack-sources/webpack-sources-tests.ts
Scott(JuJiang) ad11ed23f2 Types/webpack sources (#12484)
* feat: add definition for webpack-sources

* fix: enable strictNullChecks
2016-11-08 01:29:51 +09:00

27 lines
577 B
TypeScript

///<reference path="index.d.ts" />
import {
CachedSource,
ConcatSource,
RawSource,
LineToLineMappedSource,
PrefixSource,
ReplaceSource,
OriginalSource,
SourceMapSource,
} from 'webpack-sources';
const s1 = new OriginalSource('a', 'b');
const s2 = new CachedSource(s1);
const s3 = new ConcatSource('a', 'b', s1);
const s4 = new RawSource('hey');
const s5 = new LineToLineMappedSource('a', 'v', 'c');
const s6 = new PrefixSource(s4, s5);
const s7 = new ReplaceSource(s3, 'ha');
const s8 = new SourceMapSource('va', 'vb', 'vc', s6, 'good');