UNPKG

sucrase

Version:

Super-fast alternative to Babel for when you can target modern JS runtimes

23 lines (22 loc) 769 B
import TokenProcessor from "../TokenProcessor"; import RootTransformer from "../transformers/RootTransformer"; export declare type ClassHeaderInfo = { isExpression: boolean; className: string | null; hasSuperclass: boolean; }; export declare type ClassInfo = { headerInfo: ClassHeaderInfo; initializerStatements: Array<string>; staticInitializerSuffixes: Array<string>; constructorInsertPos: number | null; fieldRanges: Array<{ start: number; end: number; }>; }; /** * Get information about the class fields for this class, given a token processor pointing to the * open-brace at the start of the class. */ export default function getClassInfo(rootTransformer: RootTransformer, tokens: TokenProcessor): ClassInfo;