fix: make type def for TerraformState more specific

This commit is contained in:
Parkreiner
2024-07-19 20:18:11 +00:00
parent 6a87fd18e5
commit 096cd214ce

20
test.ts
View File

@@ -90,17 +90,21 @@ type TerraformStateResource = {
type: string;
name: string;
provider: string;
instances: [{ attributes: Record<string, JsonValue> }];
instances: [
{
attributes: Record<string, JsonValue>;
},
];
};
type TerraformOutput = {
type: string;
value: JsonValue;
};
export interface TerraformState {
outputs: {
[key: string]: {
type: string;
value: any;
};
};
outputs: Record<string, TerraformOutput>;
resources: [TerraformStateResource, ...TerraformStateResource[]];
}