You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Add way to remove additionalProperties ([property: string]: any) #311
This means that if a property doesn't exist, or is removed, in Protocols, then it will not be a compile error. I think some users (including myself) would prefer to know about excess/removed properties if possible.
I believe that this could be changed by making the JSON Schema include additionalProperties: false on most definitions. It seems the default for QuickType is to generate [property: string]: any; if it is not set to false.
I had the same issue, I didn't manage to prevent the interface allowing any property however I did create a wrapper interface to achieve this:
type MakeStrict<T> = {
[K in keyof T as string extends K
? never
: number extends K
? never
: K]: T[K];
};
export interface MyEventProperties {
email: string
[property: string]: any;
}
type StrictMyEventProperties = MakeStrict<MyEventProperties>
Activity
henryowens commentedon Aug 2, 2024
I had the same issue, I didn't manage to prevent the interface allowing any property however I did create a wrapper interface to achieve this:
dturkington49 commentedon Aug 14, 2024
This is also an issue for my team. Built in tracking plan support here would be very valuable.