add missing types to babel-core

This commit is contained in:
Katie Soldau
2018-05-31 11:22:57 +10:00
parent bb1cc0e143
commit eea2cffc33
+21
View File
@@ -169,9 +169,30 @@ export interface TransformOptions {
wrapPluginVisitorMethod?(pluginAlias: string, visitorType: 'enter' | 'exit', callback: (path: NodePath, state: any) => void): (path: NodePath, state: any) => void ;
}
export interface BabelFileModulesMetadata {
imports: object[];
exports: {
exported: object[],
specifiers: object[]
};
}
export interface BabelFileMetadata {
usedHelpers: string[];
marked: Array<{
type: string;
message: string;
loc: object;
}>;
modules: BabelFileModulesMetadata;
}
export interface BabelFileResult {
ast?: Node;
code?: string;
ignored?: boolean;
map?: object;
metadata?: BabelFileMetadata;
}
export as namespace babel;