Skip to content

Commit

Permalink
refactor: use TS_VERSION in string literal
Browse files Browse the repository at this point in the history
This doesn't need any type declartion
  • Loading branch information
kt3k committed Feb 16, 2019
1 parent a389d5f commit 849b184
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ ts_sources = [
"js/workers.ts",
"js/write_file.ts",
"js/performance.ts",
"js/version.ts",
"tsconfig.json",

# Listing package.json and yarn.lock as sources ensures the bundle is rebuilt
Expand Down
2 changes: 1 addition & 1 deletion js/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface Version {
export const version: Version = {
deno: null,
v8: null,
typescript: TS_VERSION
typescript: "TS_VERSION"
};

/**
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export default function makeConfig(commandOptions) {

// replace strings
replace({
TS_VERSION: `"${typescript.version}"`
TS_VERSION: typescript.version
}),

// would prefer to use `rollup-plugin-virtual` to inject the empty module, but there
Expand Down

0 comments on commit 849b184

Please sign in to comment.