Skip to content

Instantly share code, notes, and snippets.

@vivshaw
Created October 18, 2021 15:36
Show Gist options
  • Save vivshaw/f99557f518d0cf8ed39dc5c4c912e161 to your computer and use it in GitHub Desktop.
Save vivshaw/f99557f518d0cf8ed39dc5c4c912e161 to your computer and use it in GitHub Desktop.
👻 Haunted TypeScript 👻
declare namespace ⵔ {
type Ѻ
=never;type ⵔ
= "ⵔ"
type 〇
= "〇"
type O
= 〇
| ⵔ
type o <
ⵔ extends
O
, ᴏ
, ᦞ
>={ 〇
: ᦞ
; ⵔ
: ᴏ
;}[ ⵔ
];type ᴏ <
ᦞ extends
O
>= o <
, 〇
, ⵔ
>;type ᦞ <
ⵔ extends
O
, ᴏ extends
O
>= o <
, ᴏ
, 〇
>;type ଠ
= 〇
type ᱛ <
>={ ⵔ
: ଠ
};type Ⲟ <
>= ᦞ extends
? ⵔ
: 〇
type ⲟ <
, ᴏ
>= Ⲟ extends
ᱛ <
infer ᦞ
>? ᴏ extends
ᱛ <
infer o
>? ⲟ <
, o
>: 〇
: ᴏ extends
? ⵔ
: 〇
type О <
, ᴏ
>= ᴏ extends
ᱛ <
infer o
>? ᦞ extends
ᱛ <
infer Ⲟ
>? О <
, o
>: ⵔ
: 〇
type о <
, 〇
>= ᴏ <
О <
, 〇
>>;type ο <
, 〇
>= 〇 extends
ᱛ <
infer Ⲟ
>? ⵔ extends
ᱛ <
infer О
>? ο <
О
, Ⲟ
>: ଠ
: ⵔ
type Ο <
, 〇
>= 〇 extends
ᱛ <
infer _>? ⵔ extends
ᱛ <
infer _>? o <
о <
, 〇
>, Ο <
ο <
, 〇
>, 〇 >
, ⵔ >
: ଠ
: Ѻ
type ѻ
={ ⵔ
: ⵔ
};type ϙ
={ ⵔ
: 〇
:any; ଠ
: Ϙ
};type Ϙ
= ѻ
| ϙ
type Ό <
, o extends
Ϙ
>={ ⵔ
: 〇
: ⵔ
: o
};type ό <
ⵔ extends
ϙ
>= ⵔ [
"〇"
];type ȱ <
ⵔ extends
Ϙ
>= ⵔ extends
ϙ
? ⵔ [
"ଠ"
]: ѻ
type Ȱ <
ⵔ extends
Ϙ
>= ⵔ [
"ⵔ"
];type ȯ <
ⵔ extends
Ϙ
>= Ȯ <
, ѻ
>;type Ȯ <
ⵔ extends
Ϙ
, 〇 extends
Ϙ
>={ 〇
: ⵔ extends
ϙ
? Ȯ <
ȱ <
>, Ό <
ό <
>, 〇
>>: Ѻ
: 〇
}[ Ȱ <
>];type Ó <
ⵔ extends
Ϙ
, 〇
>= ⵔ extends
ϙ
? ȱ <
>extends ϙ
? o <
ᦞ <
Ⲟ <
Ο <
ό <
>, 〇
>>, ᴏ <
ⲟ <
ό <
>, 〇
>>>, Ó <
ȱ <
>, 〇
>, Ό <
ό <
>, Ó <
ȱ <
>, 〇
>>>: o <
Ⲟ <
Ο <
ό <
>, 〇
>>, ѻ
, ⵔ
>: Ѻ
type ó <
>={ 〇
: ⵔ extends
ᱛ <
infer 〇
>? Ό <
, ó <
>>: Ѻ
: ѻ
}[ Ⲟ <
>];type Ò
= ȱ <
ȯ <
ó <
ᱛ <
ᱛ <
ᱛ <
ᱛ <
ᱛ <
ᱛ <
ᱛ <
ᱛ <
ᱛ <
>>>>>>>>>>>>;type ò
= Ó <
Ò
, ό <
Ò
>>;type Ö
= Ó <
ò
, ό <
ȱ <
ò
>>>;
export type ஃ = Ö;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment