I am using latest TypeScript and Angular and i have an object:
const obj: ObjInterface = {
prop1: 1,
prop2: 2,
prop3: '3'
}
Also i have interface based on that object:
interface ObjInterface {
prop1: number;
prop2: number;
prop3: string;
}
Is it possible to create interface of the array that consist only from properties of the obj?
const array: SomeInterface = ['prop1', 'prop2', 'prop3']; // OK
const array: SomeInterface = ['prop1', 'prop2', 'prop4']; // error