Write test case that baselines the incremental build result

Testcase for #30780
This commit is contained in:
Sheetal Nandi
2019-04-05 14:33:33 -07:00
parent f617d1641b
commit 707cb93891
10 changed files with 315 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
interface RawAction {
(...args: any[]): Promise<any> | void;
}
interface ActionFactory {
<T extends RawAction>(target: T): T;
}
declare function foo<U extends any[] = any[]>(): ActionFactory;
export default foo()(function foobar(param: string): void {
});

View File

@@ -0,0 +1,11 @@
export class LazyModule<TModule> {
constructor(private importCallback: () => Promise<TModule>) {}
}
export class LazyAction<
TAction extends (...args: any[]) => any,
TModule
> {
constructor(_lazyModule: LazyModule<TModule>, _getter: (module: TModule) => TAction) {
}
}

View File

@@ -0,0 +1,5 @@
import { LazyAction, LazyModule } from './bundling';
const lazyModule = new LazyModule(() =>
import('./lazyIndex')
);
export const lazyBar = new LazyAction(lazyModule, m => m.bar);

View File

@@ -0,0 +1 @@
export { default as bar } from './bar';

View File

@@ -0,0 +1,9 @@
{
"compilerOptions": {
"target": "es5",
"declaration": true,
"outDir": "obj",
"incremental": true,
"lib": ["es5", "es2015.promise"]
}
}