VueProgram.d.ts 1.5 KB

1234567891011121314151617181920212223
  1. import * as ts from 'typescript';
  2. import { FilesRegister } from './FilesRegister';
  3. import { ResolveModuleName, ResolveTypeReferenceDirective } from './resolution';
  4. import { VueOptions } from './types/vue-options';
  5. interface ResolvedScript {
  6. scriptKind: ts.ScriptKind;
  7. content: string;
  8. }
  9. export declare class VueProgram {
  10. static loadProgramConfig(typescript: typeof ts, configFile: string, compilerOptions: object): ts.ParsedCommandLine;
  11. /**
  12. * Search for default wildcard or wildcard from options, we only search for that in tsconfig CompilerOptions.paths.
  13. * The path is resolved with thie given substitution and includes the CompilerOptions.baseUrl (if given).
  14. * If no paths given in tsconfig, then the default substitution is '[tsconfig directory]/src'.
  15. * (This is a fast, simplified inspiration of what's described here: https://github.com/Microsoft/TypeScript/issues/5039)
  16. */
  17. static resolveNonTsModuleName(moduleName: string, containingFile: string, basedir: string, options: ts.CompilerOptions): string;
  18. static isVue(filePath: string): boolean;
  19. static createProgram(typescript: typeof ts, programConfig: ts.ParsedCommandLine, basedir: string, files: FilesRegister, oldProgram: ts.Program | undefined, userResolveModuleName: ResolveModuleName | undefined, userResolveTypeReferenceDirective: ResolveTypeReferenceDirective | undefined, vueOptions: VueOptions): ts.Program;
  20. private static getScriptKindByLang;
  21. static resolveScriptBlock(typescript: typeof ts, content: string, compiler: string): ResolvedScript;
  22. }
  23. export {};