Skip to content

Commit

Permalink
Use type-only import for typescript module
Browse files Browse the repository at this point in the history
  • Loading branch information
ypresto committed Jun 17, 2021
1 parent ed4f1e7 commit fd2be90
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/doctor.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/langSvc/createHost.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion src/langSvc/createService.ts
Original file line number Diff line number Diff line change
@@ -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())
Expand Down
2 changes: 1 addition & 1 deletion src/reporter/helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as _ts from 'typescript'
import type _ts from 'typescript'
import { Message } from '../types'
import { pos2location } from '../utils'

Expand Down
2 changes: 1 addition & 1 deletion src/reporter/index.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit fd2be90

Please sign in to comment.