Skip to content

Instantly share code, notes, and snippets.

@vivshaw
Created October 18, 2021 15:36
Show Gist options
  • Select an option

  • Save vivshaw/f99557f518d0cf8ed39dc5c4c912e161 to your computer and use it in GitHub Desktop.

Select an option

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