Complete the code to declare a generic interface named Container with a type parameter T.
interface Container<[1]> {
value: T;
}The generic type parameter is usually named T by convention. It allows the interface to work with any type.
Complete the code to declare a generic interface Pair with two type parameters T and U.
interface Pair<[1], U> {
first: T;
second: U;
}The first generic type parameter is T, which is used for the first property.
Fix the error in the generic interface declaration by completing the code.
interface Result<[1]> {
data: T[];
error?: string;
}The generic type parameter T must match the type used inside the interface.
Fill both blanks to declare a generic interface Dictionary with key type K and value type V.
interface Dictionary<[1], [2]> { [key: K]: V; }
The key type parameter is K and the value type parameter is V.
Fill all three blanks to declare a generic interface Triple with types A, B, and C for its properties.
interface Triple<[1], [2], [3]> { first: A; second: B; third: C; }
The generic parameters correspond to the property types: A, B, and C.