3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

Add stricter type check for TemplateSafeValueContainer in templateFormatter

This commit is contained in:
Dragory 2021-08-18 20:23:34 +03:00
parent 5c55f35339
commit 7a1eed254a

View file

@ -57,6 +57,9 @@ function isTemplateSafeValue(value: unknown): value is TemplateSafeValue {
}
export class TemplateSafeValueContainer {
// Fake property used for stricter type checks since TypeScript uses structural typing
_isTemplateSafeValueContainer: true;
[key: string]: TemplateSafeValue;
constructor(data: Record<string, TemplateSafeValue> = {}) {