Interface RequestDecorator<A, P>
interface RequestDecorator<A, P extends Place> {
"[token]": Given<A, P, true>;
<
T extends unknown,
K extends string | symbol | undefined,
I extends number,
>(
target: T,
key: K,
index: [A] extends [ParameterOf<T, K, I>]
? I
: "the parameter's type does not accept what the request gives",
): void;
}
"[token]": Given<A, P, true>;
<
T extends unknown,
K extends string | symbol | undefined,
I extends number,
>(
target: T,
key: K,
index: [A] extends [ParameterOf<T, K, I>]
? I
: "the parameter's type does not accept what the request gives",
): void;
}
Type Parameters
- A
- P extends Place
-
RequestDecorator<
T extends unknown,
K extends string | symbol | undefined,
I extends number,
>(
target: T,
key: K,
index: [A] extends [ParameterOf<T, K, I>]
? I
: "the parameter's type does not accept what the request gives",
): voidMarks the parameter at position
indexof the constructor oftarget, whenkeyisundefined, or of its methodkey.Type Parameters
- T extends unknown
- K extends string | symbol | undefined
- I extends number
Parameters
Returns void
A decorator that marks a parameter with a request for something of type
A, in one of the placesPnames. It compiles only on a parameter in such a place, whose declared type acceptsA.