blob: 055f4167e7b96db6ff0d05156267763bd07071cb (
plain) (
blame)
1
2
3
4
5
6
7
|
// This isn't a real property, but it prevents T being compatible with Shadow<T>.
declare const shadowTag: unique symbol
export type Shadow<T> = T & {[shadowTag]: true}
export function castAsShadow<T>(value: T): Shadow<T> {
return value as any as Shadow<T>
}
|