Iは、次のシグネチャを持つメソッドをproduce
有する:typescript内の別のオブジェクトと同じキーを持つオブジェクト?
interface ProduceConditions {
[key: string]: Function|Promise<any>;
}
produce(conditions: ProduceConditions, input: any): Promise<object>|object;
ものが返さ(分解)の目的は、conditions
オブジェクトと同じキーを有することです。
編集:私は私はあなたが正しく求めているものを理解していれば、あなたの入力conditions
が持つProduceConditions
の実装となりますhttps://github.com/selfrefactor/rambdax/blob/master/modules/produce.js
「keyof」はgoogleをご覧ください。 https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-1.html –
チップのための@トーラザブローありがとうございます。私はそれを徹底的に調べます。 –