-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed
Description
π Search Terms
ts2556 ts2345
π Version & Regression Information
version: 5.3.3
β― Playground Link
No response
π» Code
const BoxGeometry = (_width: number, _height: number) => undefined;
const SphereGeometry = (_radius: number, _height: number, _openEnded?: boolean) => undefined;
export const Geometry = {
Box: BoxGeometry,
Sphere: SphereGeometry,
};
type GeometryType = keyof typeof Geometry;
export type GetArgument<T extends GeometryType> = Parameters<(typeof Geometry)[T]>;
export function load<T extends GeometryType>(type: T, args: GetArgument<T>) {
const geometry = Geometry[type](...args);
}
π Actual behavior
π Expected behavior
...args should not report an error
Additional information about the issue
No response
MartinJohns
Metadata
Metadata
Assignees
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed