diff options
Diffstat (limited to 'cli/tests/testdata/jsr/registry/@denotest')
6 files changed, 49 insertions, 0 deletions
diff --git a/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph/0.1.0/mod.ts b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph/0.1.0/mod.ts new file mode 100644 index 000000000..e81b2309a --- /dev/null +++ b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph/0.1.0/mod.ts @@ -0,0 +1,17 @@ +// add some statements that will be removed by the subset +// type graph so that we can test that the source map works +console.log(1); +console.log(2); +console.log(3); + +export class Foo { + method(): number { + return Math.random(); + } +} + +// this won't be type checked against because the subset +// type graph omit this code because it's not part of the +// public API. +const invalidTypeCheck: number = ""; +console.log(invalidTypeCheck); diff --git a/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph/0.1.0_meta.json b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph/0.1.0_meta.json new file mode 100644 index 000000000..631a18d0e --- /dev/null +++ b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph/0.1.0_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "./mod.ts" + } +} diff --git a/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph/meta.json b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph/meta.json new file mode 100644 index 000000000..d10aa5c3a --- /dev/null +++ b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "0.1.0": {} + } +} diff --git a/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph_invalid/0.1.0/mod.ts b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph_invalid/0.1.0/mod.ts new file mode 100644 index 000000000..6a5036bf5 --- /dev/null +++ b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph_invalid/0.1.0/mod.ts @@ -0,0 +1,12 @@ +export class Foo { + method() { + return Math.random(); + } +} + +// This will be analyzed because the method above is missing an +// explicit type which is required for the subset type graph to take +// effect. So the entire source file will be type checked against, +// causing a type error here. +const invalidTypeCheck: number = ""; +console.log(invalidTypeCheck); diff --git a/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph_invalid/0.1.0_meta.json b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph_invalid/0.1.0_meta.json new file mode 100644 index 000000000..631a18d0e --- /dev/null +++ b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph_invalid/0.1.0_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "./mod.ts" + } +} diff --git a/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph_invalid/meta.json b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph_invalid/meta.json new file mode 100644 index 000000000..d10aa5c3a --- /dev/null +++ b/cli/tests/testdata/jsr/registry/@denotest/subset_type_graph_invalid/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "0.1.0": {} + } +} |
