microsoft / microsoft/TypeScript

@template is lost when importing method

Ouverte
#36,477 0 commentaires 1 réaction 1 personne assignée Voir sur GitHub

@minestarks y travaille déjà.

Depuis le 26/2/2020.

Needs Investigation
Langage dominant
Go
Étoiles
111k
Forks
14.3k
Merge moyen
2 j 4 h
PR mergées (30 j)
132

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.