index.d.ts 621 B

12345678910111213141516
  1. import type * as ts from 'typescript/lib/tsserverlibrary';
  2. import * as vue from '@vue/language-core';
  3. import * as vueTs from '@vue/typescript';
  4. export type Hook = (program: _Program) => void;
  5. export type _Program = ts.Program & {
  6. __vue: ProgramContext;
  7. };
  8. interface ProgramContext {
  9. projectVersion: number;
  10. options: ts.CreateProgramOptions;
  11. languageHost: vue.TypeScriptLanguageHost;
  12. vueCompilerOptions: Partial<vue.VueCompilerOptions>;
  13. languageService: ReturnType<typeof vueTs.createLanguageService>;
  14. }
  15. export declare function createProgram(options: ts.CreateProgramOptions): _Program;
  16. export {};