Ich kenne Typ Union & Typ Schnittpunkt in Typ Skript, aber ich konnte keine Syntax oder Workaround zu Typausschluss zu finden. Gibt es eine Möglichkeit, das zu tun?Typoskript-Typ Ausschluss?
type ValidIndices = string^'_reservedProperty'; // All strings but '_reservedProperty'
interface MyInterface {
[property: ValidIndices]: number;
_reservedProperty: any;
}
Es gibt [Vorschlag] (https://github.com/Microsoft/TypeScript/issues/4183) für Subtraktionsarten –