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 |
|---|---|---|---|---|---|---|---|---|
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/model/componentMissing.test.ts | test/ut/spec/model/componentMissing.test.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/model/timelineMediaOptions.test.ts | test/ut/spec/model/timelineMediaOptions.test.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/model/Global.test.ts | test/ut/spec/model/Global.test.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/model/componentDependency.test.ts | test/ut/spec/model/componentDependency.test.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/api/containPixel.test.ts | test/ut/spec/api/containPixel.test.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/api/getVisual.test.ts | test/ut/spec/api/getVisual.test.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/api/converter.test.ts | test/ut/spec/api/converter.test.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/data/createDimensions.test.ts | test/ut/spec/data/createDimensions.test.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/data/SeriesData.test.ts | test/ut/spec/data/SeriesData.test.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/data/dataValueHelper.test.ts | test/ut/spec/data/dataValueHelper.test.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/data/dataTransform.test.ts | test/ut/spec/data/dataTransform.test.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/scale/interval.test.ts | test/ut/spec/scale/interval.test.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/series/custom.test.ts | test/ut/spec/series/custom.test.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/series/aria-columns-exclude.test.ts | test/ut/spec/series/aria-columns-exclude.test.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/component/visualMap/setOption.test.ts | test/ut/spec/component/visualMap/setOption.test.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/component/graphic/setOption.test.ts | test/ut/spec/component/graphic/setOption.test.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | true |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/component/dataZoom/helper.test.ts | test/ut/spec/component/dataZoom/helper.test.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/spec/component/helper/sliderMove.test.ts | test/ut/spec/component/helper/sliderMove.test.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/core/setup.ts | test/ut/core/setup.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/core/extendExpect.ts | test/ut/core/extendExpect.ts |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/ut/core/utHelper.ts | test/ut/core/utHelper.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/types/esm/basic.ts | test/types/esm/basic.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/types/esm/importPartial.ts | test/types/esm/importPartial.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/types/esm/event.ts | test/types/esm/event.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/types/cjs/main.ts | test/types/cjs/main.ts | import echarts = require('echarts');
function init() {
var myChart = echarts.init(document.getElementById('chart0'));
const option: echarts.EChartsOption = {
title: {
text: 'ECharts Getting Started Example'
},
tooltip: {},
xAxis: {
data: ['a', 'b', 'c', ... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/test/types/no-module/main.ts | test/types/no-module/main.ts | /// <reference types="echarts" />
function init() {
var myChart = echarts.init(document.getElementById('chart0'));
const option: echarts.EChartsOption = {
title: {
text: 'ECharts Getting Started Example'
},
tooltip: {},
xAxis: {
data: ['a', 'b', 'c', 'd'... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/build/template/components.d.ts | build/template/components.d.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/build/template/core.d.ts | build/template/core.d.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/build/template/charts.d.ts | build/template/charts.d.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/build/template/features.d.ts | build/template/features.d.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/build/template/option.d.ts | build/template/option.d.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/build/template/renderers.d.ts | build/template/renderers.d.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
apache/echarts | https://github.com/apache/echarts/blob/09198192bbb1e274beb408c650c515f8e3a057a5/build/template/ssr/client/index.d.ts | build/template/ssr/client/index.d.ts | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may no... | typescript | Apache-2.0 | 09198192bbb1e274beb408c650c515f8e3a057a5 | 2026-01-04T15:27:48.935924Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/locales.ts | scripts/locales.ts | export const defaultLocale = 'en'
export const supportedLocales = ['en', 'zh-CN', 'ja', 'ko', 'pt-BR'] as const
export const messages = {
'en': require('./locales/en.json'),
'zh-CN': require('./locales/zh-CN.json'),
'ja': require('./locales/ja.json'),
'ko': require('./locales/ko.json'),
'pt-BR': require('./... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/translate.ts | scripts/translate.ts | import path from 'node:path'
import fs from 'fs-extra'
import { translate } from '@vitalets/google-translate-api'
import { QUIZ_ROOT, loadQuizByNo, loadQuizzes } from './loader'
import { resolveFilePath } from './utils/resolve'
import type { Quiz } from './types'
import type { SupportedLocale } from './locales'
import ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/translate-cli.ts | scripts/translate-cli.ts | import { updateREADMEs } from './readme'
import { translateAllQuizzes } from './translate'
import { defaultLocale } from './locales'
async function run() {
await translateAllQuizzes(defaultLocale, 'zh-CN')
await translateAllQuizzes(defaultLocale, 'ja')
await translateAllQuizzes(defaultLocale, 'pt-BR')
await up... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/build.ts | scripts/build.ts | import path from 'node:path'
import fs from 'fs-extra'
import { loadQuizzes, resolveInfo } from './loader'
import { REPO, toPlaygroundUrl, toQuestionsRawREADME, toQuizREADME, toRawREADME, toShareAnswerFull, toSolutionsFull } from './toUrl'
import { defaultLocale, supportedLocales } from './locales'
import { formatToCod... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/loader.ts | scripts/loader.ts | import path from 'node:path'
import fs from 'fs-extra'
import fg from 'fast-glob'
import YAML from 'js-yaml'
import type { Quiz, QuizMetaInfo } from './types'
import { defaultLocale, supportedLocales } from './locales'
export async function loadFile(filepath: string) {
if (fs.existsSync(filepath))
return await f... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/readme.ts | scripts/readme.ts | import path from 'node:path'
import process from 'node:process'
import fs from 'fs-extra'
import type { SupportedLocale } from './locales'
import { defaultLocale, f, supportedLocales, t } from './locales'
import { loadQuizzes, resolveInfo } from './loader'
import { toAnswerShort, toNearborREADME, toPlayShort, toQuizREA... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/toUrl.ts | scripts/toUrl.ts | import lzs from 'lz-string'
import type { Quiz } from './types'
import { defaultLocale } from './locales'
import { resolveInfo } from './loader'
export const REPO = 'https://github.com/type-challenges/type-challenges'
export const DOMAIN = 'https://tsch.js.org'
export const TYPESCRIPT_PLAYGROUND = 'https://www.typescr... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/types.ts | scripts/types.ts | import type { DeepPartial } from 'utility-types'
import type { context, getOctokit } from '@actions/github'
import type Core from '@actions/core'
import type IO from '@actions/io'
export type Github = ReturnType<typeof getOctokit>
export type Context = typeof context
export type Action = (github: Github, context: Cont... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/generate-play.ts | scripts/generate-play.ts | import path from 'node:path'
import process from 'node:process'
import crypto from 'node:crypto'
import fs from 'fs-extra'
import c from 'ansis'
import prompts from 'prompts'
import { formatToCode } from './actions/utils/formatToCode'
import { loadQuizzes, resolveInfo } from './loader'
import { supportedLocales } from ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/actions/issue-pr.ts | scripts/actions/issue-pr.ts | import YAML from 'js-yaml'
import slug from 'limax'
import { PushCommit } from '@type-challenges/octokit-create-pull-request'
import type { Action, Context, Github, Quiz } from '../types'
import { t } from '../locales'
import { toPlaygroundUrl } from '../toUrl'
import { toBadgeLink } from '../readme'
import { resolveFi... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/actions/loader.ts | scripts/actions/loader.ts | import process from 'node:process'
import * as core from '@actions/core'
import { context, getOctokit } from '@actions/github'
import * as io from '@actions/io'
process.on('unhandledRejection', handleError)
main().catch(handleError)
async function main(): Promise<void> {
const token = process.argv[2]
const fnName... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/actions/toggle-pr-with-issue.ts | scripts/actions/toggle-pr-with-issue.ts | import type { Action } from '../types'
const action: Action = async (github, context, core) => {
const payload = context.payload || {}
const issue = payload.issue
if (!issue)
return
const labels: string[] = (issue.labels || [])
.map((i: any) => i && i.name)
.filter(Boolean)
if (!labels.include... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/actions/labeling.ts | scripts/actions/labeling.ts | import type { Action } from '../types'
const action: Action = async (github, context, core) => {
const payload = context.payload
const issue = payload.issue
if (!issue)
return
const labels: string[] = (issue.labels || [])
.map((i: any) => i && i.name)
.filter(Boolean)
if (labels.includes('answ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/actions/utils/toCommentBlock.ts | scripts/actions/utils/toCommentBlock.ts | export const toCommentBlock = function (text: string) {
return `/*\n${
text
.trim()
.split('\n')
.map(i => i.trim() ? ` ${i}`.trimEnd() : '')
.join('\n')
}\n*/\n`
}
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/actions/utils/toDivider.ts | scripts/actions/utils/toDivider.ts | export const toDivider = function (text: string) {
return `\n/* _____________ ${text} _____________ */\n`
}
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/actions/utils/toFooter.ts | scripts/actions/utils/toFooter.ts | import type { Quiz } from '../../types'
import type { SupportedLocale } from '../../locales'
import { t } from '../../locales'
import { toAnswerShort, toHomepageShort, toSolutionsShort } from '../../toUrl'
export const toFooter = function (quiz: Quiz, locale: SupportedLocale) {
return '\n\n'
+ `> ${t(locale, 'l... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/actions/utils/toLinks.ts | scripts/actions/utils/toLinks.ts | import type { Quiz } from '../../types'
import type { SupportedLocale } from '../../locales'
import { t } from '../../locales'
import { toReadmeShort } from '../../toUrl'
export function toLinks(quiz: Quiz, locale: SupportedLocale) {
return '\n\n'
+ `> ${t(locale, 'link.view-on-github')}${toReadmeShort(quiz.no, ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/actions/utils/toInfoHeader.ts | scripts/actions/utils/toInfoHeader.ts | import type { Quiz } from '../../types'
import type { SupportedLocale } from '../../locales'
import { t } from '../../locales'
import { resolveInfo } from '../../loader'
export const toInfoHeader = function toInfoHeader(quiz: Quiz, locale: SupportedLocale) {
const info = resolveInfo(quiz, locale)
const author = `... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/actions/utils/formatToCode.ts | scripts/actions/utils/formatToCode.ts | import type { Quiz } from '../../types'
import type { SupportedLocale } from '../../locales'
import { defaultLocale, t } from '../../locales'
import { toCommentBlock } from './toCommentBlock'
import { toInfoHeader } from './toInfoHeader'
import { toLinks } from './toLinks'
import { toDivider } from './toDivider'
import... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/scripts/utils/resolve.ts | scripts/utils/resolve.ts | import { defaultLocale } from '../locales'
export function resolveFilePath(dir: string, name: string, ext: string, locale: string) {
if (locale === defaultLocale)
return `${dir}/${name}.${ext}`
else
return `${dir}/${name}.${locale}.${ext}`
}
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00004-easy-pick/test-cases.ts | questions/00004-easy-pick/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Expected1, MyPick<Todo, 'title'>>>,
Expect<Equal<Expected2, MyPick<Todo, 'title' | 'completed'>>>,
// @ts-expect-error
MyPick<Todo, 'title' | 'completed' | 'invalid'>,
]
interface Todo {
title: string
description: stri... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00004-easy-pick/template.ts | questions/00004-easy-pick/template.ts | type MyPick<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/02059-hard-drop-string/test-cases.ts | questions/02059-hard-drop-string/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<DropString<'butter fly!', ''>, 'butter fly!'>>,
Expect<Equal<DropString<'butter fly!', ' '>, 'butterfly!'>>,
Expect<Equal<DropString<'butter fly!', 'but'>, 'er fly!'>>,
Expect<Equal<DropString<' b u t t e r f l y ! ', 'but'... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/02059-hard-drop-string/template.ts | questions/02059-hard-drop-string/template.ts | type DropString<S, 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/27958-medium-checkrepeatedtuple/test-cases.ts | questions/27958-medium-checkrepeatedtuple/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<CheckRepeatedTuple<[number, number, string, boolean]>, true>>,
Expect<Equal<CheckRepeatedTuple<[number, string]>, false>>,
Expect<Equal<CheckRepeatedTuple<[1, 2, 3]>, false>>,
Expect<Equal<CheckRepeatedTuple<[1, 2, 1]>, tru... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/27958-medium-checkrepeatedtuple/template.ts | questions/27958-medium-checkrepeatedtuple/template.ts | type CheckRepeatedTuple<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/26401-medium-json-schema-to-typescript/test-cases.ts | questions/26401-medium-json-schema-to-typescript/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
// + Primitive types
type Type1 = JSONSchema2TS<{
type: 'string'
}>
type Expected1 = string
type Result1 = Expect<Equal<Type1, Expected1>>
type Type2 = JSONSchema2TS<{
type: 'number'
}>
type Expected2 = number
type Result2 = Expect<Equal<Type2, Expected2... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/26401-medium-json-schema-to-typescript/template.ts | questions/26401-medium-json-schema-to-typescript/template.ts | type JSONSchema2TS<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/08767-medium-combination/test-cases.ts | questions/08767-medium-combination/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Combination<['foo', 'bar', 'baz']>, 'foo' | 'bar' | 'baz' | 'foo bar' | 'foo bar baz' | 'foo baz' | 'foo baz bar' | 'bar foo' | 'bar foo baz' | 'bar baz' | 'bar baz foo' | 'baz foo' | 'baz foo bar' | 'baz bar' | 'baz bar foo'>>,
... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/08767-medium-combination/template.ts | questions/08767-medium-combination/template.ts | type Combination<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/10969-medium-integer/test-cases.ts | questions/10969-medium-integer/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
let x = 1
let y = 1 as const
type cases1 = [
Expect<Equal<Integer<1>, 1>>,
Expect<Equal<Integer<1.1>, never>>,
Expect<Equal<Integer<1.0>, 1>>,
Expect<Equal<Integer<1.000000000>, 1>>,
Expect<Equal<Integer<0.5>, never>>,
Expect<Equal<Integer<28.00>... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/10969-medium-integer/template.ts | questions/10969-medium-integer/template.ts | type Integer<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/04037-hard-ispalindrome/test-cases.ts | questions/04037-hard-ispalindrome/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<IsPalindrome<'abc'>, false>>,
Expect<Equal<IsPalindrome<'b'>, true>>,
Expect<Equal<IsPalindrome<'abca'>, false>>,
Expect<Equal<IsPalindrome<'abba'>, true>>,
Expect<Equal<IsPalindrome<'abcba'>, true>>,
Expect<Equal<IsPal... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/04037-hard-ispalindrome/template.ts | questions/04037-hard-ispalindrome/template.ts | type IsPalindrome<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/03057-easy-push/test-cases.ts | questions/03057-easy-push/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Push<[], 1>, [1]>>,
Expect<Equal<Push<[1, 2], '3'>, [1, 2, '3']>>,
Expect<Equal<Push<['1', 2, '3'], boolean>, ['1', 2, '3', boolean]>>,
]
type errors = [
// @ts-expect-error
Expect<Equal<Push<number[], string>, 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/03057-easy-push/template.ts | questions/03057-easy-push/template.ts | type Push<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/00216-extreme-slice/test-cases.ts | questions/00216-extreme-slice/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type Arr = [1, 2, 3, 4, 5]
type cases = [
// basic
Expect<Equal<Slice<Arr, 0, 1>, [1]>>,
Expect<Equal<Slice<Arr, 0, 0>, []>>,
Expect<Equal<Slice<Arr, 2, 4>, [3, 4]>>,
// optional args
Expect<Equal<Slice<[]>, []>>,
Expect<Equal<Slice<Arr>, Arr>... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00216-extreme-slice/template.ts | questions/00216-extreme-slice/template.ts | type Slice<Arr, Start, End> = 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/34286-hard-take-elements/test-cases.ts | questions/34286-hard-take-elements/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Take<2, [1, 2, 3]>, [1, 2]>>,
Expect<Equal<Take<3, ['1', 2, true, false]>, ['1', 2, true]>>,
Expect<Equal<Take<-2, [1, 2, 3]>, [2, 3]>>,
Expect<Equal<Take<0, [1, 2, 3]>, []>>,
Expect<Equal<Take<5, [1, 2, 3]>, [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/34286-hard-take-elements/template.ts | questions/34286-hard-take-elements/template.ts | type Take<N, Arr> = Arr
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/21104-medium-findall/test-cases.ts | questions/21104-medium-findall/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<FindAll<'Collection of TypeScript type challenges', 'Type'>, [14]>>,
Expect<Equal<FindAll<'Collection of TypeScript type challenges', 'pe'>, [16, 27]>>,
Expect<Equal<FindAll<'Collection of TypeScript type challenges', ''>, []... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/21104-medium-findall/template.ts | questions/21104-medium-findall/template.ts | type FindAll<T extends string, P 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/00697-extreme-tag/test-cases.ts | questions/00697-extreme-tag/test-cases.ts | import type { Equal, Expect, IsTrue } from '@type-challenges/utils'
/**
* Tests of assignable of tagged variables.
*/
interface I {
foo: string
}
declare let x0: I
declare let x1: Tag<I, 'a'>
declare let x2: Tag<I, 'b'>
declare let x3: Tag<Tag<I, 'a'>, 'b'>
declare let x4: Tag<Tag<I, 'b'>, 'a'>
declare let x5: Ta... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00697-extreme-tag/template.ts | questions/00697-extreme-tag/template.ts | type GetTags<B> = any
type Tag<B, T extends string> = any
type UnTag<B> = any
type HasTag<B, T extends string> = any
type HasTags<B, T extends readonly string[]> = any
type HasExactTags<B, T extends readonly 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/00006-hard-simple-vue/test-cases.ts | questions/00006-hard-simple-vue/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
SimpleVue({
data() {
// @ts-expect-error
this.firstname
// @ts-expect-error
this.getRandom()
// @ts-expect-error
this.data()
return {
firstname: 'Type',
lastname: 'Challenges',
amount: 10,
}
},
computed... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00006-hard-simple-vue/template.ts | questions/00006-hard-simple-vue/template.ts | declare function SimpleVue(options: 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/00106-medium-trimleft/test-cases.ts | questions/00106-medium-trimleft/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<TrimLeft<'str'>, 'str'>>,
Expect<Equal<TrimLeft<' str'>, 'str'>>,
Expect<Equal<TrimLeft<' str'>, 'str'>>,
Expect<Equal<TrimLeft<' str '>, 'str '>>,
Expect<Equal<TrimLeft<' \n\t foo bar '>, 'foo bar '>>,
... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00106-medium-trimleft/template.ts | questions/00106-medium-trimleft/template.ts | type TrimLeft<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/14188-hard-run-length-encoding/test-cases.ts | questions/14188-hard-run-length-encoding/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
// Raw string -> encoded string
Expect<Equal<RLE.Encode<'AAABCCXXXXXXY'>, '3AB2C6XY'>>,
// Encoded string -> decoded string
Expect<Equal<RLE.Decode<'3AB2C6XY'>, 'AAABCCXXXXXXY'>>,
]
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/14188-hard-run-length-encoding/template.ts | questions/14188-hard-run-length-encoding/template.ts | namespace RLE {
export type Encode<S extends string> = any
export type Decode<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/25170-medium-replace-first/test-cases.ts | questions/25170-medium-replace-first/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<ReplaceFirst<[1, 2, 3], 3, 4>, [1, 2, 4]>>,
Expect<Equal<ReplaceFirst<['A', 'B', 'C'], 'C', 'D'>, ['A', 'B', 'D']>>,
Expect<Equal<ReplaceFirst<[true, true, true], true, false>, [false, true, true]>>,
Expect<Equal<ReplaceFir... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/25170-medium-replace-first/template.ts | questions/25170-medium-replace-first/template.ts | type ReplaceFirst<T extends readonly unknown[], S, 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/03326-medium-bem-style-string/test-cases.ts | questions/03326-medium-bem-style-string/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<BEM<'btn', ['price'], []>, 'btn__price'>>,
Expect<Equal<BEM<'btn', ['price'], ['warning', 'success']>, 'btn__price--warning' | 'btn__price--success' >>,
Expect<Equal<BEM<'btn', [], ['small', 'medium', 'large']>, 'btn--small' ... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/03326-medium-bem-style-string/template.ts | questions/03326-medium-bem-style-string/template.ts | type BEM<B extends string, E extends string[], M 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/05423-hard-intersection/test-cases.ts | questions/05423-hard-intersection/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<Intersection<[[1, 2], [2, 3], [2, 2]]>, 2>>,
Expect<Equal<Intersection<[[1, 2, 3], [2, 3, 4], [2, 2, 3]]>, 2 | 3>>,
Expect<Equal<Intersection<[[1, 2], [3, 4], [5, 6]]>, never>>,
Expect<Equal<Intersection<[[1, 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/05423-hard-intersection/template.ts | questions/05423-hard-intersection/template.ts | type Intersection<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/00062-medium-type-lookup/test-cases.ts | questions/00062-medium-type-lookup/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
interface Cat {
type: 'cat'
breeds: 'Abyssinian' | 'Shorthair' | 'Curl' | 'Bengal'
}
interface Dog {
type: 'dog'
breeds: 'Hound' | 'Brittany' | 'Bulldog' | 'Boxer'
color: 'brown' | 'white' | 'black'
}
type Animal = Cat | Dog
type cases = [
Expe... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00062-medium-type-lookup/template.ts | questions/00062-medium-type-lookup/template.ts | type LookUp<U, 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/18220-medium-filter/test-cases.ts | questions/18220-medium-filter/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type Falsy = false | 0 | '' | null | undefined
type cases = [
Expect<Equal<Filter<[0, 1, 2], 2>, [2]>>,
Expect<Equal<Filter<[0, 1, 2], 0 | 1>, [0, 1]>>,
Expect<Equal<Filter<[0, 1, 2], Falsy>, [0]>>,
]
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/18220-medium-filter/template.ts | questions/18220-medium-filter/template.ts | type Filter<T extends any[], P> = []
| typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00533-easy-concat/test-cases.ts | questions/00533-easy-concat/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
const tuple = [1] as const
type cases = [
Expect<Equal<Concat<[], []>, []>>,
Expect<Equal<Concat<[], [1]>, [1]>>,
Expect<Equal<Concat<typeof tuple, typeof tuple>, [1, 1]>>,
Expect<Equal<Concat<[1, 2], [3, 4]>, [1, 2, 3, 4]>>,
Expect<Equal<Concat<['... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00533-easy-concat/template.ts | questions/00533-easy-concat/template.ts | type Concat<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/00018-easy-tuple-length/test-cases.ts | questions/00018-easy-tuple-length/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
const tesla = ['tesla', 'model 3', 'model X', 'model Y'] as const
const spaceX = ['FALCON 9', 'FALCON HEAVY', 'DRAGON', 'STARSHIP', 'HUMAN SPACEFLIGHT'] as const
type cases = [
Expect<Equal<Length<typeof tesla>, 4>>,
Expect<Equal<Length<typeof spaceX>, 5... | typescript | MIT | 00122042c4c58f12227e97c68235dfde1fd2129d | 2026-01-04T15:39:52.431107Z | false |
type-challenges/type-challenges | https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00018-easy-tuple-length/template.ts | questions/00018-easy-tuple-length/template.ts | type Length<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/00599-medium-merge/test-cases.ts | questions/00599-medium-merge/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type Foo = {
a: number
b: string
}
type Bar = {
b: number
c: boolean
}
type cases = [
Expect<Equal<Merge<Foo, Bar>, {
a: number
b: number
c: 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/00599-medium-merge/template.ts | questions/00599-medium-merge/template.ts | type Merge<F, 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/05181-hard-mutable-keys/test-cases.ts | questions/05181-hard-mutable-keys/test-cases.ts | import type { Equal, Expect } from '@type-challenges/utils'
type cases = [
Expect<Equal<MutableKeys<{ a: number, readonly b: string }>, 'a'>>,
Expect<Equal<MutableKeys<{ a: undefined, readonly b: undefined }>, 'a'>>,
Expect<Equal<MutableKeys<{ a: undefined, readonly b?: undefined, c: string, d: null }>, 'a' | 'c... | 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.