microsoft / microsoft/TypeScript

@template is lost when importing method

Offen
#36,477 0 Kommentare 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

@minestarks arbeitet bereits daran.

Seit 26.2.2020.

Needs Investigation
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.4k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

TypeScript Version: 3.6.3

Search Terms:
template

Code

const $indicatrix = require('./indicatrix')

/**
 * Will print the loading text and refresh the CLI line to show the ellipsis while the promise is loading.
 * @param {string} text The text to display in the CLI.
 * @param {!Promise<T>|function(...*): !Promise<T>} promise The promise or an async function that returns the promise.
 * @return {Promise<T>}
 * @template T
 */
function indicatrix(text, promise, options) {
  return $indicatrix(text, promise, options)
}

module.exports = indicatrix

import this from another file

/**
 * @type {_indicatrix.indicatrix}
 */
async function $indicatrix(text, promise, options = {}) {
  // implementation ...
}

/**
 * @suppress {nonStandardJsDocs}
 * @typedef {import('..')} _indicatrix.indicatrix
 */

Expected behavior:

supposed to be like in the original location

image

Actual behavior:

the template bit is lost

image

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.