// This isn't a real property, but it prevents T being compatible with Shadow. declare const shadowTag: unique symbol export type Shadow = T & {[shadowTag]: true} export function castAsShadow(value: T): Shadow { return value as any as Shadow }