Skip to content

Commit c52f16c

Browse files
authored
feat: expose internal ts object (#627)
1 parent 17e89a0 commit c52f16c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

test/schema.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import addFormats from "ajv-formats";
33
import { assert } from "chai";
44
import { readFileSync } from "fs";
55
import { resolve } from "path";
6-
import { versionMajorMinor as typescriptVersionMajorMinor } from "typescript";
76
import * as TJS from "../typescript-json-schema";
87

8+
const { versionMajorMinor: typescriptVersionMajorMinor } = TJS.ts;
9+
910
let ajvWarnings: string[] = [];
1011
const ajv = new Ajv({
1112
logger: {

typescript-json-schema.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { JSONSchema7, JSONSchema7TypeName } from "json-schema";
77
import { pathEqual } from "path-equal";
88
export { Program, CompilerOptions, Symbol } from "typescript";
99

10+
export { ts };
11+
1012
const vm = require("vm");
1113

1214
const REGEX_FILE_NAME_OR_SPACE = /(\bimport\(".*?"\)|".*?")\.| /g;

0 commit comments

Comments
 (0)