const fields = ref<Record<string, Field>>({
name: {
value: '1',
placeholder: '123'
} as InputField,
});
interface Shape {
color: string;
}
interface Square extends Shape {
sideLength: number;
}
interface Polygon extends Shape {
edgesCount: number;
}
let square = {
color: 'blue',
sideLength: 10,
};
let poligon = {
color: 'red',
edgesCount: 3,
};
const test = (a: Shape) => {
console.log(a);
}
test(square);
test(poligon);
interface Field {
value: any,
validation?: FieldValidation,
[index: string]: any,
}
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
Он тогда обычные пути с алиасами перестает понимать