We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ts-json-schema-generator/src/Utils/typeKeys.ts
Line 95 in 5928a3d
Should allow literal for item[][0] => { 0: item }:
item[][0] => { 0: item }
if (type instanceof ArrayType && (index instanceof NumberType || index instanceof LiteralType)) { return type.getItem(); }
For type:
type GetDepositProcessedResult = { trx: { _items: { 0: DepositProcessed; }; }; }
Full example:
type Pick2<T, K1 extends keyof T, K2 extends keyof T[K1]> = { [P1 in K1]: { [P2 in K2]: T[P1][P2]; }; }; type DepositProcessed = { bla: 4 }; export type DepositProcessedByUserDoc = { trx: { _items: DepositProcessed[]; }; }; export type GetDepositProcessedResult = Pick2< DepositProcessedByUserDoc, "trx", "_items", 0 >;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ts-json-schema-generator/src/Utils/typeKeys.ts
Line 95 in 5928a3d
Should allow literal for
item[][0] => { 0: item }
:For type:
Full example:
The text was updated successfully, but these errors were encountered: