diff --git a/tests/fixture/issue-1455/case1/input/.swcrc b/tests/fixture/issue-1455/case1/input/.swcrc new file mode 100644 index 000000000000..45a6553f67ac --- /dev/null +++ b/tests/fixture/issue-1455/case1/input/.swcrc @@ -0,0 +1,15 @@ +{ + "exclude": [".*.js$", ".*.map$", ".*.test.ts$"], + "jsc": { + "target": "es2016", + "parser": { + "syntax": "typescript", + "tsx": false, + "decorators": true + } + }, + "minify": false, + "module": { + "type": "commonjs" + } +} diff --git a/tests/fixture/issue-1455/case1/input/index.ts b/tests/fixture/issue-1455/case1/input/index.ts new file mode 100644 index 000000000000..545f76e635b1 --- /dev/null +++ b/tests/fixture/issue-1455/case1/input/index.ts @@ -0,0 +1,10 @@ +const SampleData = typedModel("SampleVideo", VideosSchema, undefined, undefined, { + byPlatform: async function (platform: string) { + const result = await this.find({ platform: { $eq: platform } }); + return result; + }, +}); + +SampleData.byPlatform("youtube").then((res) => { + console.info(res); +}); \ No newline at end of file