diff options
Diffstat (limited to 'cli/tests/testdata')
3 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/no_types_cjs/main.ts b/cli/tests/testdata/npm/no_types_cjs/main.ts new file mode 100644 index 000000000..32458e839 --- /dev/null +++ b/cli/tests/testdata/npm/no_types_cjs/main.ts @@ -0,0 +1,7 @@ +import mod from "npm:@denotest/no-types-cjs"; + +// it actually returns a `number` and has that in its +// jsdocs, but the jsdocs should not have been resolved so +// this should type check just fine +const value: string = mod(); +console.log(value); diff --git a/cli/tests/testdata/npm/registry/@denotest/no-types-cjs/1.0.0/main.js b/cli/tests/testdata/npm/registry/@denotest/no-types-cjs/1.0.0/main.js new file mode 100644 index 000000000..bb6cbdb02 --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/no-types-cjs/1.0.0/main.js @@ -0,0 +1,6 @@ +/** + * @return {number} + */ + module.exports = function () { + return 5; +}; diff --git a/cli/tests/testdata/npm/registry/@denotest/no-types-cjs/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/no-types-cjs/1.0.0/package.json new file mode 100644 index 000000000..60b8a0285 --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/no-types-cjs/1.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@denotest/no-types-cjs", + "version": "1.0.0", + "main": "./main.js" +} |