microsoft / microsoft/TypeScript

Quick info shouldn't default to showing jsdoc from first overload

オープン
#45,337 コメント 7 件 リアクション 0 件 担当者 1 名 GitHub で見る

@sandersn がすでに取り組んでいます。

2021年8月12日 から。

Needs Proposal Suggestion
主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

https://github.com/microsoft/TypeScript/issues/43053

This is still happening at least with the tap function from rxjs. VSCode 1.58.2. TS version in project: 4.3.5

Deprecation warning shows up regardless of which overloaded signature you use. Should not show up for the last two signatures.

import { interval } from 'rxjs';
import { tap } from 'rxjs/operators';

interval(5000)
  .pipe(
     tap(console.log), // "deprecated - Use an observer instead of a complete callback"
     tap({ next: console.log, error: console.log, complete: console.log }) // "deprecated
  )

rxjs/tap.d.ts:

import { MonoTypeOperatorFunction, PartialObserver } from '../types';
/** @deprecated Use an observer instead of a complete callback */
export declare function tap<T>(next: null | undefined, error: null | undefined, complete: () => void): MonoTypeOperatorFunction<T>;
/** @deprecated Use an observer instead of an error callback */
export declare function tap<T>(next: null | undefined, error: (error: any) => void, complete?: () => void): MonoTypeOperatorFunction<T>;
/** @deprecated Use an observer instead of a complete callback */
export declare function tap<T>(next: (value: T) => void, error: null | undefined, complete: () => void): MonoTypeOperatorFunction<T>;
export declare function tap<T>(next?: (x: T) => void, error?: (e: any) => void, complete?: () => void): MonoTypeOperatorFunction<T>;
export declare function tap<T>(observer: PartialObserver<T>): MonoTypeOperatorFunction<T>;

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。