diff --git a/test/valid-data-type.test.ts b/test/valid-data-type.test.ts index c1699a58..39e626b4 100644 --- a/test/valid-data-type.test.ts +++ b/test/valid-data-type.test.ts @@ -145,4 +145,6 @@ describe("valid-data-type", () => { it("lowercase", assertValidSchema("lowercase", "MyType")); it("promise-extensions", assertValidSchema("promise-extensions", "*")); + + it("export-star", assertValidSchema("export-star", "*", undefined, { mainTsOnly: true })); }); diff --git a/test/valid-data/export-star/literal.ts b/test/valid-data/export-star/literal.ts new file mode 100644 index 00000000..e7a9fe6e --- /dev/null +++ b/test/valid-data/export-star/literal.ts @@ -0,0 +1,5 @@ +export type A = 1; + +export type B = "string"; + +type C = "internal"; diff --git a/test/valid-data/export-star/main.ts b/test/valid-data/export-star/main.ts new file mode 100644 index 00000000..5333cbd8 --- /dev/null +++ b/test/valid-data/export-star/main.ts @@ -0,0 +1,4 @@ +export * from "./literal"; +export * from "./object"; + +export type External = 1; diff --git a/test/valid-data/export-star/object.ts b/test/valid-data/export-star/object.ts new file mode 100644 index 00000000..e9ebcace --- /dev/null +++ b/test/valid-data/export-star/object.ts @@ -0,0 +1,11 @@ +export interface D { + a: 1; +} + +export class E { + b: 2; +} + +interface F { + internal: true; +} diff --git a/test/valid-data/export-star/schema.json b/test/valid-data/export-star/schema.json new file mode 100644 index 00000000..0c34121c --- /dev/null +++ b/test/valid-data/export-star/schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "A": { + "const": 1, + "type": "number" + }, + "B": { + "const": "string", + "type": "string" + }, + "D": { + "additionalProperties": false, + "properties": { + "a": { + "const": 1, + "type": "number" + } + }, + "required": [ + "a" + ], + "type": "object" + }, + "E": { + "additionalProperties": false, + "properties": { + "b": { + "const": 2, + "type": "number" + } + }, + "required": [ + "b" + ], + "type": "object" + }, + "External": { + "const": 1, + "type": "number" + } + } +}