0
既存のd.tsファイルにカスタムオーバーロードを追加することはできますか?Typescript定義ファイルカスタムオーバーロード
私はBluebird Promise.allを使用していて、6個のアイテムの配列を使用しています。定義ファイルは、5つの項目をカバー:
static all<T1, T2, T3, T4, T5>(values: [Bluebird.Thenable<T1> | T1, Bluebird.Thenable<T2> | T2, Bluebird.Thenable<T3> | T3, Bluebird.Thenable<T4> | T4, Bluebird.Thenable<T5> | T5]): Bluebird<[T1, T2, T3, T4, T5]>;
static all<T1, T2, T3, T4>(values: [Bluebird.Thenable<T1> | T1, Bluebird.Thenable<T2> | T2, Bluebird.Thenable<T3> | T3, Bluebird.Thenable<T4> | T4]): Bluebird<[T1, T2, T3, T4]>;
static all<T1, T2, T3>(values: [Bluebird.Thenable<T1> | T1, Bluebird.Thenable<T2> | T2, Bluebird.Thenable<T3> | T3]): Bluebird<[T1, T2, T3]>;
static all<T1, T2>(values: [Bluebird.Thenable<T1> | T1, Bluebird.Thenable<T2> | T2]): Bluebird<[T1, T2]>;
static all<T1>(values: [Bluebird.Thenable<T1> | T1]): Bluebird<[T1]>;
私はプル要求は私のシングルユースケースのために必要であると私はElasticBeanstalkにアップロードする際に、コンパイルが失敗しないように、定義ファイルを追加したいとは思いません。
私は必要なのは私のプロジェクトのために
static all<T1, T2, T3, T4, T5, T6>(values: ...
を追加する機能です。
; Typescriptにこの「エラー」を無視させることはできますか?