lukeautry / tsoa

Build OpenAPI-compliant REST APIs using TypeScript and Node
MIT License
3.33k stars 481 forks source link

UnknownType: IndexedAccessType error when using enum to index type object #1589

Closed ashe0047 closed 4 months ago

ashe0047 commented 4 months ago

Hello, I am on v6.0.1 but im getting the error UnknownType: IndexedAccessType error when using enum to index type object. Below is the code:

export enum TestEnum {
    Test = "test",
}
export type TestFetchParams = {
    [TestEnum.Test]: [config: Config];
};

function(params: TestFetchParams[TestEnum]){}

Error:

Generate routes error.
 GenerateMetadataError: Unknown type: IndexedAccessType
This was caused by 'params: TestFetchParams[TestEnum]'
jackey8616 commented 4 months ago

Duplicate with #1375