From 5b9547b1ba473a1ba234e98d35a095b7db8bd796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sat, 26 Aug 2023 17:57:45 +0200 Subject: [PATCH] Add a fourslash completions test related to JSDoc `@template` on prototype method (#55513) --- .../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 00000000000..065663f2620 --- /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"] });