Let's say the interface has some known properties with their types, and can have additional ones with unknown keys and some other types, something like:
interface Foo {
length: number;
[key: string]: string;
}
const foo : Foo = {
length: 1,
txt: "TXT",
};
TS error:
Property 'length' of type 'number' is not assignable to string index type 'string'.
How should such an interface be typed?