st-bundle
Version:
CLI for watching and bundling SpringType projects.
51 lines (50 loc) • 1.46 kB
TypeScript
import { IAssembleResolveResult } from '../main/assemble';
import { ImportType, IResolver } from '../resolver/resolver';
interface IFastAnalysisProps {
debug?: boolean;
packageName?: string;
input: string;
parseUsingAst?: boolean;
locations?: boolean;
}
interface IBrowserEssential {
variable: string;
moduleName: string;
obj?: string;
}
export declare type IWebWorkerType = 'Worker' | 'SharedWorker';
export interface IWebWorkerItem {
type?: IWebWorkerType;
path: string;
absPath?: string;
bundlePath?: string;
}
export interface IFastAnalysis {
ast?: any;
workers?: Array<IWebWorkerItem>;
imports?: Array<{
type: ImportType;
statement: string;
link?: IAssembleResolveResult;
resolver?: IResolver;
}>;
report?: {
contains__dirname?: boolean;
contains__filename?: boolean;
browserEssentials?: Array<IBrowserEssential>;
dynamicImports?: boolean;
es6Syntax?: boolean;
statementsReplaced?: boolean;
transpiled?: boolean;
containsJSX?: boolean;
};
replaceable?: IStatementReplaceableCollection;
}
export declare type IStatementReplaceableCollection = Array<IStatementReplaceAble>;
export interface IStatementReplaceAble {
type: ImportType;
fromStatement: string;
toStatement: string;
}
export declare function fastAnalysis(props: IFastAnalysisProps): IFastAnalysis;
export {};