Skip to content

Commit

Permalink
Add a test case to demonstrate the problem with @type and infer
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmcginness committed May 19, 2024
1 parent 79a8514 commit cda5366
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/cases/fourslash/jsDocInferredFunctionParameters.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
///<reference path="fourslash.ts" />

// @allowJs: true
// @checkJs: true
// @strict: true
// @noEmit: true
// @noLib: true

// @Filename: func.js
////export function func(/** @type {string} */ param) {}

// @Filename: use-it.ts
////import { func } from './func.js'
////type FuncParam/**/ = (typeof func) extends (...args: infer P) => any ? P : never;

goTo.marker();
verify.quickInfoIs(`type FuncParam = [param: string]`)

0 comments on commit cda5366

Please sign in to comment.