Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 096cd21

Browse files
committed
fix: make type def for TerraformState more specific
1 parent 6a87fd1 commit 096cd21

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

test.ts

+12-8
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,21 @@ type TerraformStateResource = {
9090
type: string;
9191
name: string;
9292
provider: string;
93-
instances: [{ attributes: Record<string, JsonValue> }];
93+
94+
instances: [
95+
{
96+
attributes: Record<string, JsonValue>;
97+
},
98+
];
9499
};
95100

96-
export interface TerraformState {
97-
outputs: {
98-
[key: string]: {
99-
type: string;
100-
value: any;
101-
};
102-
};
101+
type TerraformOutput = {
102+
type: string;
103+
value: JsonValue;
104+
};
103105

106+
export interface TerraformState {
107+
outputs: Record<string, TerraformOutput>;
104108
resources: [TerraformStateResource, ...TerraformStateResource[]];
105109
}
106110

0 commit comments

Comments
 (0)