From ed3a2aff6eaf2d0397a0e05a584f5cf5aeec4606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sat, 26 Aug 2023 00:27:01 +0200 Subject: [PATCH] Add a fourslash completions test related to JSDoc `@template` on prototype method --- .../jsdocTemplatePrototypeCompletions.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/cases/fourslash/jsdocTemplatePrototypeCompletions.ts diff --git a/tests/cases/fourslash/jsdocTemplatePrototypeCompletions.ts b/tests/cases/fourslash/jsdocTemplatePrototypeCompletions.ts new file mode 100644 index 0000000000000..065663f2620cb --- /dev/null +++ b/tests/cases/fourslash/jsdocTemplatePrototypeCompletions.ts @@ -0,0 +1,18 @@ +/// + +// @checkJs: true +// @filename: index.js + +//// https://github.com/microsoft/TypeScript/issues/11492 + +//// /** @constructor */ +//// function Foo() {} +//// /** +//// * @template T +//// * @param {T} bar +//// * @returns {T} +//// */ +//// Foo.prototype.foo = function (bar) {}; +//// new Foo().foo({ id: 1234 })./**/ + +verify.completions({ marker: "", exact: ["id"] });