diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2018-10-16 03:47:48 +1100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-10-15 12:47:48 -0400 |
commit | 25c97962f4c14c9b946100be4cb133e1483bb7c8 (patch) | |
tree | bdf564a7c028ee381be46b77bf3edb8380810d67 /tools/ts_library_builder | |
parent | dc8841d8a98122d762ec21ed119dbcc2f78e7300 (diff) |
Update to TypeScript 3.1 and ts-simple-ast 17 (#980)
Diffstat (limited to 'tools/ts_library_builder')
-rw-r--r-- | tools/ts_library_builder/build_library.ts | 6 | ||||
-rw-r--r-- | tools/ts_library_builder/test.ts | 9 |
2 files changed, 6 insertions, 9 deletions
diff --git a/tools/ts_library_builder/build_library.ts b/tools/ts_library_builder/build_library.ts index 589e26a82..9bd4d4ee5 100644 --- a/tools/ts_library_builder/build_library.ts +++ b/tools/ts_library_builder/build_library.ts @@ -2,12 +2,10 @@ import { writeFileSync } from "fs"; import * as prettier from "prettier"; import { ExpressionStatement, - ModuleKind, - ModuleResolutionKind, NamespaceDeclarationKind, Project, - ScriptTarget, SourceFile, + ts, Type, TypeGuards } from "ts-simple-ast"; @@ -52,6 +50,8 @@ export interface BuildLibraryOptions { silent?: boolean; } +const { ModuleKind, ModuleResolutionKind, ScriptTarget } = ts; + /** * A preamble which is appended to the start of the library. */ diff --git a/tools/ts_library_builder/test.ts b/tools/ts_library_builder/test.ts index e5317b393..b123cb1c5 100644 --- a/tools/ts_library_builder/test.ts +++ b/tools/ts_library_builder/test.ts @@ -2,16 +2,13 @@ // // ./node_modules/.bin/ts-node --project tools/ts_library_builder/tsconfig.json tools/ts_library_builder/test.ts -import { - ModuleKind, - ModuleResolutionKind, - Project, - ScriptTarget -} from "ts-simple-ast"; +import { Project, ts } from "ts-simple-ast"; import { assert, assertEqual, test } from "../../js/testing/testing"; import { flatten, merge } from "./build_library"; import { loadDtsFiles } from "./ast_util"; +const { ModuleKind, ModuleResolutionKind, ScriptTarget } = ts; + /** setups and returns the fixtures for testing */ function setupFixtures() { const basePath = process.cwd(); |