Sorting
-
I'm submitting a ...
-
I confirm that I
I found several referneced, but they all appeard to be fixed...?
Expected Behavior
When I tun tsoa routes the following controller fails:
export type BaseIVR3Config = {
walkingSkeletonPath: WalkingSkeletonPath;
bestMovies: BestMovies;
};
export type BaseIVR3ConfigKey = keyof BaseIVR3Config;
export type BaseIVR3ConfigValue = BaseIVR3Config[BaseIVR3ConfigKey]; // WalkingSkeletonPath | BestMovies
type WalkingSkeletonPath = 'A' | 'B';
type BestMovies = {
title: string;
year: number;
}[];
@Route('config2')
export class Config2Controller extends Controller {
constructor(private useCases: ConfigUseCases) {
super();
}
@Get('{key}')
async getByKey(@Path() key: BaseIVR3ConfigKey): Promise<BaseIVR3ConfigValue | 'error'> {
const result = await this.useCases.getByKey(key);
if (result.ok) {
return result.value.value;
}
return 'error';
}
}
Current Behavior
This fails with:
Generate routes error.
GenerateMetadataError: Unknown type: IndexedAccessType
This was caused by 'BaseIVR3Config[BaseIVR3ConfigKey] | 'error''
Possible Solution
Unknown
Steps to Reproduce
Use the above code with tsoa
Context (Environment)
Version of the library: 6.2.1
Version of NodeJS: 18.13.0
- Confirm you were using yarn not npm: [ ]
Detailed Description
N/A See above
Breaking change?
Sorting
I'm submitting a ...
I confirm that I
I found several referneced, but they all appeard to be fixed...?
Expected Behavior
When I tun
tsoa routesthe following controller fails:Current Behavior
This fails with:
Possible Solution
Unknown
Steps to Reproduce
Use the above code with
tsoaContext (Environment)
Version of the library:
6.2.1Version of NodeJS:
18.13.0pnpmDetailed Description
N/A See above
Breaking change?