repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/05181-hard-mutable-keys/template.ts | questions/05181-hard-mutable-keys/template.ts | type MutableKeys<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/03376-medium-inordertraversal/test-cases.ts | questions/03376-medium-inordertraversal/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
const tree1 = {
val: 1,
left: null,
right: {
val: 2,
left: {
val: 3,
left: null,
right: null,
},
right: null,
},
} as const
const tree2 = {
val: 1,
left: null,
right: null,
} as const
const tree3 = {
val: 1,... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/03376-medium-inordertraversal/template.ts | questions/03376-medium-inordertraversal/template.ts | interface TreeNode {
val: number
left: TreeNode | null
right: TreeNode | null
}
type InorderTraversal<T extends TreeNode | null> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04179-medium-flip/test-cases.ts | questions/04179-medium-flip/test-cases.ts | import type { Equal, Expect, NotEqual } from '@type-challenges/utils'
type cases = [
Expect<Equal<{ a: 'pi' }, Flip<{ pi: 'a' }>>>,
Expect<NotEqual<{ b: 'pi' }, Flip<{ pi: 'a' }>>>,
Expect<Equal<{ 3.14: 'pi', true: 'bool' }, Flip<{ pi: 3.14, bool: true }>>>,
Expect<Equal<{ val2: 'prop2', val: 'prop' }, Flip<{ ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04179-medium-flip/template.ts | questions/04179-medium-flip/template.ts | type Flip<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00191-medium-append-argument/test-cases.ts | questions/00191-medium-append-argument/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type Case1 = AppendArgument<(a: number, b: string) => number, boolean>
type Result1 = (a: number, b: string, x: boolean) => number
type Case2 = AppendArgument<() => void, undefined>
type Result2 = (x: undefined) => void
type cases = [
Expect<Equal<Case1, ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00191-medium-append-argument/template.ts | questions/00191-medium-append-argument/template.ts | type AppendArgument<Fn, A> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00949-medium-anyof/test-cases.ts | questions/00949-medium-anyof/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<AnyOf<[1, 'test', true, [1], { name: 'test' }, { 1: 'test' }]>, true>>,
Expect<Equal<AnyOf<[1, '', false, [], {}]>, true>>,
Expect<Equal<AnyOf<[0, 'test', false, [], {}]>, true>>,
Expect<Equal<AnyOf<[0, '', true, [], {}]>, ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00949-medium-anyof/template.ts | questions/00949-medium-anyof/template.ts | type AnyOf<T extends readonly any[]> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00116-medium-replace/test-cases.ts | questions/00116-medium-replace/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Replace<'foobar', 'bar', 'foo'>, 'foofoo'>>,
Expect<Equal<Replace<'foobarbar', 'bar', 'foo'>, 'foofoobar'>>,
Expect<Equal<Replace<'foobarbar', '', 'foo'>, 'foobarbar'>>,
Expect<Equal<Replace<'foobarbar', 'bar', ''>, 'foobar... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00116-medium-replace/template.ts | questions/00116-medium-replace/template.ts | type Replace<S extends string, From extends string, To extends string> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/35252-medium-isalphabet/test-cases.ts | questions/35252-medium-isalphabet/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<IsAlphabet<'A'>, true>>,
Expect<Equal<IsAlphabet<'z'>, true>>,
Expect<Equal<IsAlphabet<'9'>, false>>,
Expect<Equal<IsAlphabet<'!'>, false>>,
Expect<Equal<IsAlphabet<'😂'>, false>>,
Expect<Equal<IsAlphabet<''>, false>>,
... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/35252-medium-isalphabet/template.ts | questions/35252-medium-isalphabet/template.ts | type IsAlphabet<S extends string> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04484-medium-istuple/test-cases.ts | questions/04484-medium-istuple/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<IsTuple<[]>, true>>,
Expect<Equal<IsTuple<[number]>, true>>,
Expect<Equal<IsTuple<readonly [1]>, true>>,
Expect<Equal<IsTuple<{ length: 1 }>, false>>,
Expect<Equal<IsTuple<number[]>, false>>,
Expect<Equal<IsTuple<never>... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04484-medium-istuple/template.ts | questions/04484-medium-istuple/template.ts | type IsTuple<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00527-medium-append-to-object/test-cases.ts | questions/00527-medium-append-to-object/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type test1 = {
key: 'cat'
value: 'green'
}
type testExpect1 = {
key: 'cat'
value: 'green'
home: boolean
}
type test2 = {
key: 'dog' | undefined
value: 'white'
sun: true
}
type testExpect2 = {
key: 'dog' | undefined
value: 'white'
sun:... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00527-medium-append-to-object/template.ts | questions/00527-medium-append-to-object/template.ts | type AppendToObject<T, U, V> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00898-easy-includes/test-cases.ts | questions/00898-easy-includes/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Includes<['Kars', 'Esidisi', 'Wamuu', 'Santana'], 'Kars'>, true>>,
Expect<Equal<Includes<['Kars', 'Esidisi', 'Wamuu', 'Santana'], 'Dio'>, false>>,
Expect<Equal<Includes<[1, 2, 3, 5, 6, 7], 7>, true>>,
Expect<Equal<Includes<... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00898-easy-includes/template.ts | questions/00898-easy-includes/template.ts | type Includes<T extends readonly any[], U> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/34857-medium-defined-partial-record/test-cases.ts | questions/34857-medium-defined-partial-record/test-cases.ts | import type { Equal, Expect, ExpectTrue, NotAny, NotEqual } from '@type-challenges/utils'
type A1 = Record<'a' | 'b', string>
type E1 = { a: string } |
{ b: string } |
{ a: string, b: string }
type D1 = DefinedPartial<A1>
type C1 = Expect<Equal<D1, E1>>
type A2 = Record<'a' | 'b' | 'c', string>
type E2 = { a: str... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/34857-medium-defined-partial-record/template.ts | questions/34857-medium-defined-partial-record/template.ts | type DefinedPartial<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/30970-medium-shitariteraru/test-cases.ts | questions/30970-medium-shitariteraru/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type testcase =
| Expect<Equal<IsFixedStringLiteralType<'ABC'>, true>>
| Expect<Equal<IsFixedStringLiteralType<string>, false>>
| Expect<Equal<IsFixedStringLiteralType<'ABC' | 'DEF'>, false>>
| Expect<Equal<IsFixedStringLiteralType<never>, false>>
|... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/30970-medium-shitariteraru/template.ts | questions/30970-medium-shitariteraru/template.ts | type IsFixedStringLiteralType<S extends string> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/02949-hard-objectfromentries/test-cases.ts | questions/02949-hard-objectfromentries/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
interface Model {
name: string
age: number
locations: string[] | null
}
type ModelEntries = ['name', string] | ['age', number] | ['locations', string[] | null]
type cases = [
Expect<Equal<ObjectFromEntries<ModelEntries>, Model>>,
]
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/02949-hard-objectfromentries/template.ts | questions/02949-hard-objectfromentries/template.ts | type ObjectFromEntries<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/09160-hard-assign/test-cases.ts | questions/09160-hard-assign/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
// case1
type Case1Target = {}
type Case1Origin1 = {
a: 'a'
}
type Case1Origin2 = {
b: 'b'
}
type Case1Origin3 = {
c: 'c'
}
type Case1Answer = {
a: 'a'
b: 'b'
c: 'c'
}
// case2
type Case2Target = {
a: [1, 2, 3]
}
type Case2Origin1 = {
a:... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/09160-hard-assign/template.ts | questions/09160-hard-assign/template.ts | type Assign<T extends Record<string, unknown>, U> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/33345-extreme-dynamic-route/test-cases.ts | questions/33345-extreme-dynamic-route/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<DynamicRoute<'/shop'>, {}>>,
Expect<Equal<DynamicRoute<'/shop/[]'>, {}>>,
Expect<Equal<DynamicRoute<'/shop/[slug]'>, { slug: string }>>,
Expect<Equal<DynamicRoute<'/shop/[slug]/'>, { slug: string }>>,
Expect<
Equal<Dy... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/33345-extreme-dynamic-route/template.ts | questions/33345-extreme-dynamic-route/template.ts | type DynamicRoute<T extends string> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/05360-medium-unique/test-cases.ts | questions/05360-medium-unique/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Unique<[1, 1, 2, 2, 3, 3]>, [1, 2, 3]>>,
Expect<Equal<Unique<[1, 2, 3, 4, 4, 5, 6, 7]>, [1, 2, 3, 4, 5, 6, 7]>>,
Expect<Equal<Unique<[1, 'a', 2, 'b', 2, 'a']>, [1, 'a', 2, 'b']>>,
Expect<Equal<Unique<[string, number, 1, 'a'... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/05360-medium-unique/template.ts | questions/05360-medium-unique/template.ts | type Unique<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00108-medium-trim/test-cases.ts | questions/00108-medium-trim/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Trim<'str'>, 'str'>>,
Expect<Equal<Trim<' str'>, 'str'>>,
Expect<Equal<Trim<' str'>, 'str'>>,
Expect<Equal<Trim<'str '>, 'str'>>,
Expect<Equal<Trim<' str '>, 'str'>>,
Expect<Equal<Trim<' \n\t foo bar \t'... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00108-medium-trim/template.ts | questions/00108-medium-trim/template.ts | type Trim<S extends string> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00296-medium-permutation/test-cases.ts | questions/00296-medium-permutation/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Permutation<'A'>, ['A']>>,
Expect<Equal<Permutation<'A' | 'B' | 'C'>, ['A', 'B', 'C'] | ['A', 'C', 'B'] | ['B', 'A', 'C'] | ['B', 'C', 'A'] | ['C', 'A', 'B'] | ['C', 'B', 'A']>>,
Expect<Equal<Permutation<'B' | 'A' | 'C'>, ['A... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00296-medium-permutation/template.ts | questions/00296-medium-permutation/template.ts | type Permutation<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/01383-hard-camelize/test-cases.ts | questions/01383-hard-camelize/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<
Camelize<{
some_prop: string
prop: { another_prop: string }
array: [
{ snake_case: string },
{ another_element: { yet_another_prop: string } },
{ yet_another_element: string },
... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/01383-hard-camelize/template.ts | questions/01383-hard-camelize/template.ts | type Camelize<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/05117-medium-without/test-cases.ts | questions/05117-medium-without/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Without<[1, 2], 1>, [2]>>,
Expect<Equal<Without<[1, 2, 4, 1, 5], [1, 2]>, [4, 5]>>,
Expect<Equal<Without<[2, 3, 2, 3, 2, 3, 2, 3], [2, 3]>, []>>,
]
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/05117-medium-without/template.ts | questions/05117-medium-without/template.ts | type Without<T, U> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/30430-medium-tower-of-hanoi/test-cases.ts | questions/30430-medium-tower-of-hanoi/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type Tests = [
Expect<Equal<Hanoi<0>, []>>,
Expect<Equal<Hanoi<1>, [['A', 'B']]>>,
Expect<Equal<Hanoi<2>, [['A', 'C'], ['A', 'B'], ['C', 'B']]>>,
Expect<Equal<Hanoi<3>, [['A', 'B'], ['A', 'C'], ['B', 'C'], ['A', 'B'], ['C', 'A'], ['C', 'B'], ['A', 'B'... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/30430-medium-tower-of-hanoi/template.ts | questions/30430-medium-tower-of-hanoi/template.ts | type Hanoi<N extends number, From = 'A', To = 'B', Intermediate = 'C'> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/01290-hard-pinia/test-cases.ts | questions/01290-hard-pinia/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
const store = defineStore({
id: '',
state: () => ({
num: 0,
str: '',
}),
getters: {
stringifiedNum() {
// @ts-expect-error
this.num += 1
return this.num.toString()
},
parsedNum() {
return Number.parseInt(th... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/01290-hard-pinia/template.ts | questions/01290-hard-pinia/template.ts | declare function defineStore(store: unknown): unknown
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/01367-medium-remove-index-signature/test-cases.ts | questions/01367-medium-remove-index-signature/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type Foo = {
[key: string]: any
foo(): void
}
type Bar = {
[key: number]: any
bar(): void
0: string
}
const foobar = Symbol('foobar')
type FooBar = {
[key: symbol]: any
[foobar](): void
}
type Baz = {
bar(): void
baz: string
}
type cases... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/01367-medium-remove-index-signature/template.ts | questions/01367-medium-remove-index-signature/template.ts | type RemoveIndexSignature<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04518-medium-fill/test-cases.ts | questions/04518-medium-fill/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Fill<[], 0>, []>>,
Expect<Equal<Fill<[], 0, 0, 3>, []>>,
Expect<Equal<Fill<[1, 2, 3], 0, 0, 0>, [1, 2, 3]>>,
Expect<Equal<Fill<[1, 2, 3], 0, 2, 2>, [1, 2, 3]>>,
Expect<Equal<Fill<[1, 2, 3], 0>, [0, 0, 0]>>,
Expect<Equal... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04518-medium-fill/template.ts | questions/04518-medium-fill/template.ts | type Fill<
T extends unknown[],
N,
Start extends number = 0,
End extends number = T['length'],
> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/09155-hard-validdate/test-cases.ts | questions/09155-hard-validdate/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<ValidDate<'0102'>, true>>,
Expect<Equal<ValidDate<'0131'>, true>>,
Expect<Equal<ValidDate<'1231'>, true>>,
Expect<Equal<ValidDate<'0229'>, false>>,
Expect<Equal<ValidDate<'0100'>, false>>,
Expect<Equal<ValidDate<'0132'>... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/09155-hard-validdate/template.ts | questions/09155-hard-validdate/template.ts | type ValidDate<T extends string> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/27133-medium-square/test-cases.ts | questions/27133-medium-square/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Square<0>, 0>>,
Expect<Equal<Square<1>, 1>>,
Expect<Equal<Square<3>, 9>>,
Expect<Equal<Square<20>, 400>>,
Expect<Equal<Square<100>, 10000>>,
Expect<Equal<Square<101>, 10201>>,
// Negative numbers
Expect<Equal<Squar... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/27133-medium-square/template.ts | questions/27133-medium-square/template.ts | type Square<N extends number> = number
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/05821-medium-maptypes/test-cases.ts | questions/05821-medium-maptypes/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<MapTypes<{ stringToArray: string }, { mapFrom: string, mapTo: [] }>, { stringToArray: [] }>>,
Expect<Equal<MapTypes<{ stringToNumber: string }, { mapFrom: string, mapTo: number }>, { stringToNumber: number }>>,
Expect<Equal<M... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/05821-medium-maptypes/template.ts | questions/05821-medium-maptypes/template.ts | type MapTypes<T, R> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00020-medium-promise-all/test-cases.ts | questions/00020-medium-promise-all/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
const promiseAllTest1 = PromiseAll([1, 2, 3] as const)
const promiseAllTest2 = PromiseAll([1, 2, Promise.resolve(3)] as const)
const promiseAllTest3 = PromiseAll([1, 2, Promise.resolve(3)])
const promiseAllTest4 = PromiseAll<Array<number | Promise<number>>>([... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00020-medium-promise-all/template.ts | questions/00020-medium-promise-all/template.ts | declare function PromiseAll(values: any): any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00223-hard-isany/test-cases.ts | questions/00223-hard-isany/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<IsAny<any>, true>>,
Expect<Equal<IsAny<undefined>, false>>,
Expect<Equal<IsAny<unknown>, false>>,
Expect<Equal<IsAny<never>, false>>,
Expect<Equal<IsAny<string>, false>>,
]
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00223-hard-isany/template.ts | questions/00223-hard-isany/template.ts | type IsAny<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/02793-medium-mutable/test-cases.ts | questions/02793-medium-mutable/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
interface Todo1 {
title: string
description: string
completed: boolean
meta: {
author: string
}
}
type List = [1, 2, 3]
type cases = [
Expect<Equal<Mutable<Readonly<Todo1>>, Todo1>>,
Expect<Equal<Mutable<Readonly<List>>, List>>,
]
type er... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/02793-medium-mutable/template.ts | questions/02793-medium-mutable/template.ts | type Mutable<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00008-medium-readonly-2/test-cases.ts | questions/00008-medium-readonly-2/test-cases.ts | import type { Alike, Expect } from '@type-challenges/utils'
type cases = [
Expect<Alike<MyReadonly2<Todo1>, Readonly<Todo1>>>,
Expect<Alike<MyReadonly2<Todo1, 'title' | 'description'>, Expected>>,
Expect<Alike<MyReadonly2<Todo2, 'title' | 'description'>, Expected>>,
Expect<Alike<MyReadonly2<Todo2, 'description... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00008-medium-readonly-2/template.ts | questions/00008-medium-readonly-2/template.ts | type MyReadonly2<T, K> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/02595-medium-pickbytype/test-cases.ts | questions/02595-medium-pickbytype/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
interface Model {
name: string
count: number
isReadonly: boolean
isEnable: boolean
}
type cases = [
Expect<Equal<PickByType<Model, boolean>, { isReadonly: boolean, isEnable: boolean }>>,
Expect<Equal<PickByType<Model, string>, { name: string }>>,... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/02595-medium-pickbytype/template.ts | questions/02595-medium-pickbytype/template.ts | type PickByType<T, U> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/03312-easy-parameters/test-cases.ts | questions/03312-easy-parameters/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
function foo(arg1: string, arg2: number): void {}
function bar(arg1: boolean, arg2: { a: 'A' }): void {}
function baz(): void {}
type cases = [
Expect<Equal<MyParameters<typeof foo>, [string, number]>>,
Expect<Equal<MyParameters<typeof bar>, [boolean, { ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/03312-easy-parameters/template.ts | questions/03312-easy-parameters/template.ts | type MyParameters<T extends (...args: any[]) => any> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04182-medium-fibonacci-sequence/test-cases.ts | questions/04182-medium-fibonacci-sequence/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Fibonacci<1>, 1>>,
Expect<Equal<Fibonacci<2>, 1>>,
Expect<Equal<Fibonacci<3>, 2>>,
Expect<Equal<Fibonacci<8>, 21>>,
]
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04182-medium-fibonacci-sequence/template.ts | questions/04182-medium-fibonacci-sequence/template.ts | type Fibonacci<T extends number> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/08640-medium-number-range/test-cases.ts | questions/08640-medium-number-range/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type Result1 = | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
type Result2 = | 0 | 1 | 2
type Result3 =
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
| 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20
| 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30
| 31 | 32 | 33 | ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/08640-medium-number-range/template.ts | questions/08640-medium-number-range/template.ts | type NumberRange<L, H> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00015-medium-last/test-cases.ts | questions/00015-medium-last/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Last<[]>, never>>,
Expect<Equal<Last<[2]>, 2>>,
Expect<Equal<Last<[3, 2, 1]>, 1>>,
Expect<Equal<Last<[() => 123, { a: string }]>, { a: string }>>,
]
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00015-medium-last/template.ts | questions/00015-medium-last/template.ts | type Last<T extends any[]> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/31797-hard-sudoku/test-cases.ts | questions/31797-hard-sudoku/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type test_sudoku_1_actual = SudokuSolved<[
[[1, 2, 3], [5, 6, 7], [4, 8, 9]],
[[4, 8, 9], [1, 2, 3], [5, 6, 7]],
[[5, 6, 7], [4, 8, 9], [1, 2, 3]],
[[3, 1, 2], [8, 5, 6], [9, 7, 4]],
[[7, 9, 4], [3, 1, 2], [8, 5, 6]],
[[8, 5, 6], [7, 9, 4], [3, 1,... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/31797-hard-sudoku/template.ts | questions/31797-hard-sudoku/template.ts | type Digits = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
type SudokuSolved = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00459-medium-flatten/test-cases.ts | questions/00459-medium-flatten/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Flatten<[]>, []>>,
Expect<Equal<Flatten<[1, 2, 3, 4]>, [1, 2, 3, 4]>>,
Expect<Equal<Flatten<[1, [2]]>, [1, 2]>>,
Expect<Equal<Flatten<[1, 2, [3, 4], [[[5]]]]>, [1, 2, 3, 4, 5]>>,
Expect<Equal<Flatten<[{ foo: 'bar', 2: 10 ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00459-medium-flatten/template.ts | questions/00459-medium-flatten/template.ts | type Flatten = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00112-hard-capitalizewords/test-cases.ts | questions/00112-hard-capitalizewords/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<CapitalizeWords<'foobar'>, 'Foobar'>>,
Expect<Equal<CapitalizeWords<'FOOBAR'>, 'FOOBAR'>>,
Expect<Equal<CapitalizeWords<'foo bar'>, 'Foo Bar'>>,
Expect<Equal<CapitalizeWords<'foo bar hello world'>, 'Foo Bar Hello World'>>,
... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00112-hard-capitalizewords/template.ts | questions/00112-hard-capitalizewords/template.ts | type CapitalizeWords<S extends string> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/09142-medium-checkrepeatedchars/test-cases.ts | questions/09142-medium-checkrepeatedchars/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<CheckRepeatedChars<'abc'>, false>>,
Expect<Equal<CheckRepeatedChars<'abb'>, true>>,
Expect<Equal<CheckRepeatedChars<'cbc'>, true>>,
Expect<Equal<CheckRepeatedChars<''>, false>>,
]
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/09142-medium-checkrepeatedchars/template.ts | questions/09142-medium-checkrepeatedchars/template.ts | type CheckRepeatedChars<T extends string> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/09616-medium-parse-url-params/test-cases.ts | questions/09616-medium-parse-url-params/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<ParseUrlParams<''>, never>>,
Expect<Equal<ParseUrlParams<':id'>, 'id'>>,
Expect<Equal<ParseUrlParams<'posts/:id'>, 'id'>>,
Expect<Equal<ParseUrlParams<'posts/:id/'>, 'id'>>,
Expect<Equal<ParseUrlParams<'posts/:id/:user'>,... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/09616-medium-parse-url-params/template.ts | questions/09616-medium-parse-url-params/template.ts | type ParseUrlParams<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/21220-medium-permutations-of-tuple/test-cases.ts | questions/21220-medium-permutations-of-tuple/test-cases.ts | import type { Equal, Expect, ExpectFalse } from '@type-challenges/utils'
type cases = [
Expect<Equal<PermutationsOfTuple<[]>, []>>,
Expect<Equal<PermutationsOfTuple<[any]>, [any]>>,
Expect<Equal<PermutationsOfTuple<[any, unknown]>, [any, unknown] | [unknown, any]>>,
Expect<Equal<
PermutationsOfTuple<[any, ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/21220-medium-permutations-of-tuple/template.ts | questions/21220-medium-permutations-of-tuple/template.ts | type PermutationsOfTuple<T extends unknown[]> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/35314-hard-valid-sudoku/test-cases.ts | questions/35314-hard-valid-sudoku/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type Matrix0 = [
[9, 5, 7, 8, 4, 6, 1, 3, 2],
[2, 3, 4, 5, 9, 1, 6, 7, 8],
[1, 8, 6, 7, 3, 2, 5, 4, 9],
[8, 9, 1, 6, 2, 3, 4, 5, 7],
[3, 4, 5, 9, 7, 8, 2, 6, 1],
[6, 7, 2, 1, 5, 4, 8, 9, 3],
[4, 6, 8, 3, 1, 9, 7, 2, 5],
[5, 2, 3, 4, 8, 7, 9, 1... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/35314-hard-valid-sudoku/template.ts | questions/35314-hard-valid-sudoku/template.ts | type ValidSudoku<M extends number[][]> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04471-medium-zip/test-cases.ts | questions/04471-medium-zip/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Zip<[], []>, []>>,
Expect<Equal<Zip<[1, 2], [true, false]>, [[1, true], [2, false]]>>,
Expect<Equal<Zip<[1, 2, 3], ['1', '2']>, [[1, '1'], [2, '2']]>>,
Expect<Equal<Zip<[], [1, 2, 3]>, []>>,
Expect<Equal<Zip<[[1, 2]], [3]... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04471-medium-zip/template.ts | questions/04471-medium-zip/template.ts | type Zip<T, U> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00869-extreme-distributeunions/test-cases.ts | questions/00869-extreme-distributeunions/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
// Already distributed unions should stay the same:
Expect<Equal<DistributeUnions<1>, 1>>,
Expect<Equal<DistributeUnions<string>, string>>,
Expect<Equal<DistributeUnions<1 | 2>, 1 | 2>>,
Expect<Equal<DistributeUnions<'b' | { type: 'a'... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00869-extreme-distributeunions/template.ts | questions/00869-extreme-distributeunions/template.ts | type DistributeUnions<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/15260-hard-tree-path-array/test-cases.ts | questions/15260-hard-tree-path-array/test-cases.ts | import type { ExpectExtends, ExpectFalse, ExpectTrue } from '@type-challenges/utils'
declare const example: {
foo: {
bar: {
a: string
}
baz: {
b: number
c: number
}
}
}
type cases = [
ExpectTrue<ExpectExtends<Path<typeof example['foo']['bar']>, ['a']>>,
ExpectTrue<ExpectExten... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/15260-hard-tree-path-array/template.ts | questions/15260-hard-tree-path-array/template.ts | type Path<T> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00612-medium-kebabcase/test-cases.ts | questions/00612-medium-kebabcase/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<KebabCase<'FooBarBaz'>, 'foo-bar-baz'>>,
Expect<Equal<KebabCase<'fooBarBaz'>, 'foo-bar-baz'>>,
Expect<Equal<KebabCase<'foo-bar'>, 'foo-bar'>>,
Expect<Equal<KebabCase<'foo_bar'>, 'foo_bar'>>,
Expect<Equal<KebabCase<'Foo-Ba... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00612-medium-kebabcase/template.ts | questions/00612-medium-kebabcase/template.ts | type KebabCase<S> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/33763-hard-union-to-object-from-key/test-cases.ts | questions/33763-hard-union-to-object-from-key/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type Foo = {
foo: string
common: boolean
}
type Bar = {
bar: number
common: boolean
}
type Other = {
other: string
}
type cases = [
Expect<Equal<UnionToObjectFromKey<Foo | Bar, 'foo'>, Foo>>,
Expect<Equal<UnionToObjectFromKey<Foo | Bar, 'comm... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/33763-hard-union-to-object-from-key/template.ts | questions/33763-hard-union-to-object-from-key/template.ts | type UnionToObjectFromKey<Union, Key> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00517-extreme-multiply/test-cases.ts | questions/00517-extreme-multiply/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Multiply<2, 3>, '6'>>,
Expect<Equal<Multiply<3, '5'>, '15'>>,
Expect<Equal<Multiply<'4', 10>, '40'>>,
Expect<Equal<Multiply<0, 16>, '0'>>,
Expect<Equal<Multiply<'13', '21'>, '273'>>,
Expect<Equal<Multiply<'43423', 32154... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00517-extreme-multiply/template.ts | questions/00517-extreme-multiply/template.ts | type Multiply<A extends string | number | bigint, B extends string | number | bigint> = string
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/30575-hard-bitwisexor/test-cases.ts | questions/30575-hard-bitwisexor/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<BitwiseXOR<'0', '1'>, '1'>>,
Expect<Equal<BitwiseXOR<'1', '1'>, '0'>>,
Expect<Equal<BitwiseXOR<'10', '1'>, '11'>>,
Expect<Equal<BitwiseXOR<'110', '1'>, '111'>>,
Expect<Equal<BitwiseXOR<'101', '11'>, '110'>>,
]
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/30575-hard-bitwisexor/template.ts | questions/30575-hard-bitwisexor/template.ts | type BitwiseXOR<S1 extends string, S2 extends string> = any
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00270-hard-typed-get/test-cases.ts | questions/00270-hard-typed-get/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Get<Data, 'hello'>, 'world'>>,
Expect<Equal<Get<Data, 'foo.bar.count'>, 6>>,
Expect<Equal<Get<Data, 'foo.bar'>, { value: 'foobar', count: 6 }>>,
Expect<Equal<Get<Data, 'foo.baz'>, false>>,
Expect<Equal<Get<Data, 'no.exis... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.