diff --git a/src/doctor.ts b/src/doctor.ts index 3b6daee..7715b42 100644 --- a/src/doctor.ts +++ b/src/doctor.ts @@ -1,5 +1,4 @@ -import * as _ts from 'typescript' -import * as fs from 'fs' +import type _ts from 'typescript' import * as path from 'path' import { createHost, createService } from './langSvc' import { Reporter } from './reporter' @@ -36,9 +35,9 @@ export class Doctor { /** * Note: - * + * * since we use CDN-hosted TS runtime, which is a bundled version, - * we need to manually added lib.*.d.ts. + * we need to manually added lib.*.d.ts. */ const fileNames = [ ...parsed.fileNames, diff --git a/src/langSvc/createHost.ts b/src/langSvc/createHost.ts index c9e622b..829ce20 100644 --- a/src/langSvc/createHost.ts +++ b/src/langSvc/createHost.ts @@ -1,4 +1,4 @@ -import * as _ts from 'typescript' +import type _ts from 'typescript' import * as fs from 'fs' import * as path from 'path' import { FileEntry } from '../types' diff --git a/src/langSvc/createService.ts b/src/langSvc/createService.ts index 2518a35..4186017 100644 --- a/src/langSvc/createService.ts +++ b/src/langSvc/createService.ts @@ -1,4 +1,4 @@ -import * as _ts from 'typescript' +import type _ts from 'typescript' export const createService = (host: _ts.LanguageServiceHost, ts: typeof _ts) => { return ts.createLanguageService(host, ts.createDocumentRegistry()) diff --git a/src/reporter/helper.ts b/src/reporter/helper.ts index 950af4e..5c5ed77 100644 --- a/src/reporter/helper.ts +++ b/src/reporter/helper.ts @@ -1,4 +1,4 @@ -import * as _ts from 'typescript' +import type _ts from 'typescript' import { Message } from '../types' import { pos2location } from '../utils' diff --git a/src/reporter/index.ts b/src/reporter/index.ts index 4851158..390fd1d 100644 --- a/src/reporter/index.ts +++ b/src/reporter/index.ts @@ -1,4 +1,4 @@ -import * as _ts from 'typescript' +import type _ts from 'typescript' import { issueCommand } from '@actions/core/lib/command' import { nonNullable } from '../utils' import { diagnostic2message } from './helper'