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/00268-easy-if/template.ts
questions/00268-easy-if/template.ts
type If<C, T, F> = 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/02822-hard-split/test-cases.ts
questions/02822-hard-split/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<Split<'Hi! How are you?'>, ['Hi! How are you?']>>, Expect<Equal<Split<'Hi! How are you?', 'z'>, ['Hi! How are you?']>>, Expect<Equal<Split<'Hi! How are you?', ' '>, ['Hi!', 'How', 'are', 'you?']>>, Expect<Equal<Split<'Hi! H...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/02822-hard-split/template.ts
questions/02822-hard-split/template.ts
type Split<S extends string, SEP 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/09898-medium-zhao-chu-mu-biao-shu-zu-zhong-zhi-chu-xian-guo-yi-ci-de-yuan-su/test-cases.ts
questions/09898-medium-zhao-chu-mu-biao-shu-zu-zhong-zhi-chu-xian-guo-yi-ci-de-yuan-su/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<FindEles<[1, 2, 2, 3, 3, 4, 5, 6, 6, 6]>, [1, 4, 5]>>, Expect<Equal<FindEles<[2, 2, 3, 3, 6, 6, 6]>, []>>, Expect<Equal<FindEles<[1, 2, 3]>, [1, 2, 3]>>, Expect<Equal<FindEles<[1, 2, number]>, [1, 2, number]>>, Expect<Equ...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/09898-medium-zhao-chu-mu-biao-shu-zu-zhong-zhi-chu-xian-guo-yi-ci-de-yuan-su/template.ts
questions/09898-medium-zhao-chu-mu-biao-shu-zu-zhong-zhi-chu-xian-guo-yi-ci-de-yuan-su/template.ts
type FindEles<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/00110-medium-capitalize/test-cases.ts
questions/00110-medium-capitalize/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<MyCapitalize<'foobar'>, 'Foobar'>>, Expect<Equal<MyCapitalize<'FOOBAR'>, 'FOOBAR'>>, Expect<Equal<MyCapitalize<'foo bar'>, 'Foo bar'>>, Expect<Equal<MyCapitalize<''>, ''>>, Expect<Equal<MyCapitalize<'a'>, 'A'>>, Expect<...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00110-medium-capitalize/template.ts
questions/00110-medium-capitalize/template.ts
type MyCapitalize<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/27152-medium-triangular-number/test-cases.ts
questions/27152-medium-triangular-number/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<Triangular<0>, 0>>, Expect<Equal<Triangular<1>, 1>>, Expect<Equal<Triangular<3>, 6>>, Expect<Equal<Triangular<10>, 55>>, Expect<Equal<Triangular<20>, 210>>, Expect<Equal<Triangular<55>, 1540>>, Expect<Equal<Triangular...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/27152-medium-triangular-number/template.ts
questions/27152-medium-triangular-number/template.ts
type Triangular<N 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/00005-extreme-readonly-keys/test-cases.ts
questions/00005-extreme-readonly-keys/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<'title', GetReadonlyKeys<Todo1>>>, Expect<Equal<'title' | 'description', GetReadonlyKeys<Todo2>>>, ] interface Todo1 { readonly title: string description: string completed: boolean } interface Todo2 { readonly title: ...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00005-extreme-readonly-keys/template.ts
questions/00005-extreme-readonly-keys/template.ts
type GetReadonlyKeys<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/32532-hard-binary-addition/test-cases.ts
questions/32532-hard-binary-addition/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal< BinaryAdd<[1], [1]>, [1, 0] >>, Expect<Equal< BinaryAdd<[0], [1]>, [1] >>, Expect<Equal< BinaryAdd<[1, 1, 0], [0, 0, 1]>, [1, 1, 1] >>, Expect<Equal< BinaryAdd<[1, 1, 1, 1, 1, 1, 1, 1, 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/32532-hard-binary-addition/template.ts
questions/32532-hard-binary-addition/template.ts
type Bit = 1 | 0 type BinaryAdd<A extends Bit[], B extends Bit[]> = 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/05153-medium-indexof/test-cases.ts
questions/05153-medium-indexof/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<IndexOf<[1, 2, 3], 2>, 1>>, Expect<Equal<IndexOf<[2, 6, 3, 8, 4, 1, 7, 3, 9], 3>, 2>>, Expect<Equal<IndexOf<[0, 0, 0], 2>, -1>>, Expect<Equal<IndexOf<[string, 1, number, 'a'], number>, 2>>, Expect<Equal<IndexOf<[string, 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/05153-medium-indexof/template.ts
questions/05153-medium-indexof/template.ts
type IndexOf<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/28143-hard-optionalundefined/test-cases.ts
questions/28143-hard-optionalundefined/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<OptionalUndefined<{ value: string | undefined }, 'value'>, { value?: string | undefined }>>, Expect<Equal<OptionalUndefined<{ value: string, desc: string }, 'value'>, { value: string, desc: string }>>, Expect<Equal<OptionalUn...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/28143-hard-optionalundefined/template.ts
questions/28143-hard-optionalundefined/template.ts
type OptionalUndefined<T, Props> = 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/00013-warm-hello-world/test-cases.ts
questions/00013-warm-hello-world/test-cases.ts
import type { Equal, Expect, NotAny } from '@type-challenges/utils' type cases = [ Expect<NotAny<HelloWorld>>, Expect<Equal<HelloWorld, 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/00013-warm-hello-world/template.ts
questions/00013-warm-hello-world/template.ts
type HelloWorld = any // expected to be 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/14080-hard-fizzbuzz/test-cases.ts
questions/14080-hard-fizzbuzz/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<FizzBuzz<1>, ['1']>>, Expect<Equal<FizzBuzz<5>, ['1', '2', 'Fizz', '4', 'Buzz']>>, Expect<Equal<FizzBuzz<20>, [ '1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11'...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/14080-hard-fizzbuzz/template.ts
questions/14080-hard-fizzbuzz/template.ts
type FizzBuzz<N 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/00298-medium-length-of-string/test-cases.ts
questions/00298-medium-length-of-string/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<LengthOfString<''>, 0>>, Expect<Equal<LengthOfString<'kumiko'>, 6>>, Expect<Equal<LengthOfString<'reina'>, 5>>, Expect<Equal<LengthOfString<'Sound! Euphonium'>, 16>>, ]
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00298-medium-length-of-string/template.ts
questions/00298-medium-length-of-string/template.ts
type LengthOfString<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/07561-extreme-subtract/test-cases.ts
questions/07561-extreme-subtract/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<Subtract<1, 1>, 0>>, Expect<Equal<Subtract<2, 1>, 1>>, Expect<Equal<Subtract<1, 2>, never>>, // @ts-expect-error Expect<Equal<Subtract<1000, 999>, 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/07561-extreme-subtract/template.ts
questions/07561-extreme-subtract/template.ts
// M => minuend, S => subtrahend type Subtract<M extends number, S 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/03196-medium-flip-arguments/test-cases.ts
questions/03196-medium-flip-arguments/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<FlipArguments<() => boolean>, () => boolean>>, Expect<Equal<FlipArguments<(foo: string) => number>, (foo: string) => number>>, Expect<Equal<FlipArguments<(arg0: string, arg1: number, arg2: boolean) => void>, (arg0: boolean, 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/03196-medium-flip-arguments/template.ts
questions/03196-medium-flip-arguments/template.ts
type FlipArguments<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/31997-extreme-parameter-intersection/test-cases.ts
questions/31997-extreme-parameter-intersection/test-cases.ts
import type { Equal, Expect } from '@type-challenges/utils' type result1 = IntersectParameters<[], []> type TwoEmpty = Expect<Equal<[], result1>> type result2 = IntersectParameters<[], [string, number, ...boolean[]]> type OneEmpty = Expect<Equal<[string, number, ...boolean[]], result2>> type result3 = IntersectParam...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/31997-extreme-parameter-intersection/template.ts
questions/31997-extreme-parameter-intersection/template.ts
type IntersectParameters< l extends readonly unknown[], r extends readonly unknown[], > = l & r
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00213-hard-vue-basic-props/test-cases.ts
questions/00213-hard-vue-basic-props/test-cases.ts
import type { Debug, Equal, Expect, IsAny } from '@type-challenges/utils' class ClassA {} VueBasicProps({ props: { propA: {}, propB: { type: String }, propC: { type: Boolean }, propD: { type: ClassA }, propE: { type: [String, Number] }, propF: RegExp, }, data(this) { type PropsType =...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/questions/00213-hard-vue-basic-props/template.ts
questions/00213-hard-vue-basic-props/template.ts
declare function VueBasicProps(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/utils/index.d.ts
utils/index.d.ts
export type Expect<T extends true> = T export type ExpectTrue<T extends true> = T export type ExpectFalse<T extends false> = T export type IsTrue<T extends true> = T export type IsFalse<T extends false> = T export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : fal...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
type-challenges/type-challenges
https://github.com/type-challenges/type-challenges/blob/00122042c4c58f12227e97c68235dfde1fd2129d/utils/index.d.test.ts
utils/index.d.test.ts
import type { Alike, Equal, Expect, ExpectFalse, IsAny, NotEqual } from './index' type cases = [ /* Expect */ Expect<true>, // @ts-expect-error Expect<false>, /* ExpectFalse */ ExpectFalse<false>, // @ts-expect-error ExpectFalse<true>, /* Equal */ Expect<Equal<true, true>>, ExpectFalse<Equal<fa...
typescript
MIT
00122042c4c58f12227e97c68235dfde1fd2129d
2026-01-04T15:39:52.431107Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/scripts/generate-labeler-config.ts
scripts/generate-labeler-config.ts
import * as fs from 'node:fs' import * as path from 'node:path' import * as prettier from 'prettier' /** Pairs of package labels and their corresponding paths */ type LabelerPair = [string, string] function readPairsFromFs(): Array<LabelerPair> { const ignored = new Set(['.DS_Store']) const pairs: Array<LabelerP...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/scripts/generate-docs.ts
scripts/generate-docs.ts
import { resolve } from 'node:path' import { fileURLToPath } from 'node:url' import { generateReferenceDocs } from '@tanstack/typedoc-config' const __dirname = fileURLToPath(new URL('.', import.meta.url)) await generateReferenceDocs({ packages: [ { name: 'angular-query-experimental', entryPoints: [ ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/scripts/verify-links.ts
scripts/verify-links.ts
import { existsSync, readFileSync, statSync } from 'node:fs' import { extname, resolve } from 'node:path' import { glob } from 'tinyglobby' // @ts-ignore Could not find a declaration file for module 'markdown-link-extractor'. import markdownLinkExtractor from 'markdown-link-extractor' const errors: Array<{ file: str...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/vue-vite/vite.config.ts
integrations/vue-vite/vite.config.ts
import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' export default defineConfig({ plugins: [vue()], })
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/vue-vite/src/main.ts
integrations/vue-vite/src/main.ts
import { createApp } from 'vue' import App from './App.vue' import { VueQueryPlugin } from '@tanstack/vue-query' createApp(App).use(VueQueryPlugin).mount('#app')
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/vue-vite/src/vite-env.d.ts
integrations/vue-vite/src/vite-env.d.ts
/// <reference types="vite/client" />
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/svelte-vite/src/vite-env.d.ts
integrations/svelte-vite/src/vite-env.d.ts
/// <reference types="svelte" /> /// <reference types="vite/client" />
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/angular-cli-20/src/main.ts
integrations/angular-cli-20/src/main.ts
import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { App } from './app/app' bootstrapApplication(App, appConfig).catch((err) => console.error(err))
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/angular-cli-20/src/app/app.config.ts
integrations/angular-cli-20/src/app/app.config.ts
import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZonelessChangeDetection, } from '@angular/core' import { provideTanStackQuery, QueryClient, } from '@tanstack/angular-query-experimental' export const appConfig: ApplicationConfig = { providers: [ provideBrowserGlobalErrorListeners(...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/angular-cli-20/src/app/app.ts
integrations/angular-cli-20/src/app/app.ts
import { Component } from '@angular/core' import { injectQuery } from '@tanstack/angular-query-experimental' @Component({ selector: 'app-root', template: ` @if (query.isPending()) { <div>Loading...</div> } @if (query.isError()) { <div>An error has occurred!</div> } @if (query.isSucc...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-15/app/client-component.tsx
integrations/react-next-15/app/client-component.tsx
'use client' import React from 'react' import { useQuery } from '@tanstack/react-query' import { Temporal } from '@js-temporal/polyfill' export function ClientComponent() { const query = useQuery({ queryKey: ['data'], queryFn: async () => { const { count } = await ( await fetch('http://localho...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-15/app/providers.tsx
integrations/react-next-15/app/providers.tsx
// In Next.js, this file would be called: app/providers.tsx 'use client' // Since QueryClientProvider relies on useContext under the hood, we have to put 'use client' on top import { QueryClientProvider, isServer } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' import ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-15/app/layout.tsx
integrations/react-next-15/app/layout.tsx
import React from 'react' import Providers from './providers' import type { Metadata } from 'next' export const metadata: Metadata = { title: 'Create Next App', description: 'Generated by create next app', } export default function RootLayout({ children, }: { children: React.ReactNode }) { return ( <htm...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-15/app/_action.ts
integrations/react-next-15/app/_action.ts
'use server' import { revalidatePath } from 'next/cache' import { countRef } from './make-query-client' export async function queryExampleAction() { await Promise.resolve() countRef.current++ revalidatePath('/', 'page') return undefined }
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-15/app/page.tsx
integrations/react-next-15/app/page.tsx
import { headers } from 'next/headers' import React from 'react' import { HydrationBoundary, dehydrate } from '@tanstack/react-query' import { Temporal } from '@js-temporal/polyfill' import { ClientComponent } from './client-component' import { makeQueryClient } from './make-query-client' import { queryExampleAction } ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-15/app/make-query-client.ts
integrations/react-next-15/app/make-query-client.ts
import { Temporal } from '@js-temporal/polyfill' import { QueryClient, defaultShouldDehydrateQuery } from '@tanstack/react-query' import { createTson } from 'tupleson' import type { TsonType } from 'tupleson' const plainDate = { deserialize: (v) => Temporal.PlainDate.from(v), key: 'PlainDate', serialize: (v) => ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-15/app/count/route.ts
integrations/react-next-15/app/count/route.ts
import { countRef } from '../make-query-client' export const GET = () => { return Response.json({ count: countRef.current }) }
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-16/app/client-component.tsx
integrations/react-next-16/app/client-component.tsx
'use client' import React from 'react' import { useQuery } from '@tanstack/react-query' import { Temporal } from '@js-temporal/polyfill' export function ClientComponent() { const query = useQuery({ queryKey: ['data'], queryFn: async () => { const { count } = await ( await fetch('http://localho...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-16/app/providers.tsx
integrations/react-next-16/app/providers.tsx
// In Next.js, this file would be called: app/providers.tsx 'use client' // Since QueryClientProvider relies on useContext under the hood, we have to put 'use client' on top import { QueryClientProvider, isServer } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' import ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-16/app/layout.tsx
integrations/react-next-16/app/layout.tsx
import React from 'react' import Providers from './providers' import type { Metadata } from 'next' export const metadata: Metadata = { title: 'Create Next App', description: 'Generated by create next app', } export default function RootLayout({ children, }: { children: React.ReactNode }) { return ( <htm...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-16/app/_action.ts
integrations/react-next-16/app/_action.ts
'use server' import { revalidatePath } from 'next/cache' import { countRef } from './make-query-client' export async function queryExampleAction() { await Promise.resolve() countRef.current++ revalidatePath('/', 'page') return undefined }
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-16/app/page.tsx
integrations/react-next-16/app/page.tsx
import { headers } from 'next/headers' import React from 'react' import { HydrationBoundary, dehydrate } from '@tanstack/react-query' import { Temporal } from '@js-temporal/polyfill' import { ClientComponent } from './client-component' import { makeQueryClient } from './make-query-client' import { queryExampleAction } ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-16/app/make-query-client.ts
integrations/react-next-16/app/make-query-client.ts
import { Temporal } from '@js-temporal/polyfill' import { QueryClient, defaultShouldDehydrateQuery } from '@tanstack/react-query' import { createTson } from 'tupleson' import type { TsonType } from 'tupleson' const plainDate = { deserialize: (v) => Temporal.PlainDate.from(v), key: 'PlainDate', serialize: (v) => ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-16/app/count/route.ts
integrations/react-next-16/app/count/route.ts
import { countRef } from '../make-query-client' export const GET = () => { return Response.json({ count: countRef.current }) }
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-14/app/client-component.tsx
integrations/react-next-14/app/client-component.tsx
'use client' import React from 'react' import { useQuery } from '@tanstack/react-query' export function ClientComponent() { const query = useQuery({ queryKey: ['test'], queryFn: async () => { await new Promise((r) => setTimeout(r, 1000)) return 'Success' }, }) if (query.isPending) { ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-14/app/providers.tsx
integrations/react-next-14/app/providers.tsx
'use client' import * as React from 'react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' export default function Providers({ children }: { children: React.ReactNode }) { const [queryClient] = React.useState(() => new Quer...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-14/app/layout.tsx
integrations/react-next-14/app/layout.tsx
import React from 'react' import Providers from './providers' import type { Metadata } from 'next' export const metadata: Metadata = { title: 'Create Next App', description: 'Generated by create next app', } export default function RootLayout({ children, }: { children: React.ReactNode }) { return ( <htm...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/integrations/react-next-14/app/page.tsx
integrations/react-next-14/app/page.tsx
import React from 'react' import { queryOptions } from '@tanstack/react-query' import { ClientComponent } from './client-component' const options = queryOptions({ queryKey: ['foo'], }) export default function Home() { return ( <main> <ClientComponent /> Key: {JSON.stringify(options.queryKey)} ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/app.config.ts
examples/solid/solid-start-streaming/app.config.ts
import { defineConfig } from '@solidjs/start/config' export default defineConfig({})
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/global.d.ts
examples/solid/solid-start-streaming/src/global.d.ts
/// <reference types="@solidjs/start/env" />
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/entry-server.tsx
examples/solid/solid-start-streaming/src/entry-server.tsx
// @refresh reload import { createHandler, StartServer } from '@solidjs/start/server' export default createHandler(() => ( <StartServer document={({ assets, children, scripts }) => ( <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-wid...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/entry-client.tsx
examples/solid/solid-start-streaming/src/entry-client.tsx
// @refresh reload import { mount, StartClient } from '@solidjs/start/client' mount(() => <StartClient />, document.getElementById('app')!)
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/app.tsx
examples/solid/solid-start-streaming/src/app.tsx
// @refresh reload import { MetaProvider, Title } from '@solidjs/meta' import { A, Router } from '@solidjs/router' import { FileRoutes } from '@solidjs/start/router' import { Suspense } from 'solid-js' import { SolidQueryDevtools } from '@tanstack/solid-query-devtools' import { QueryClient, QueryClientProvider } from '...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/routes/with-error.tsx
examples/solid/solid-start-streaming/src/routes/with-error.tsx
import { Title } from '@solidjs/meta' import { PostViewer } from '~/components/post-viewer' import { UserInfo } from '~/components/user-info' export default function Streamed() { return ( <main> <Title>Solid Query - Errors</Title> <h1>Solid Query - Errors</h1> <div class="description"> ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/routes/mixed.tsx
examples/solid/solid-start-streaming/src/routes/mixed.tsx
import { Title } from '@solidjs/meta' import { PostViewer } from '~/components/post-viewer' import { UserInfo } from '~/components/user-info' export default function Mixed() { return ( <main> <Title>Solid Query - Mixed</Title> <h1>Solid Query - Mixed Example</h1> <div class="description"> ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/routes/hydration.tsx
examples/solid/solid-start-streaming/src/routes/hydration.tsx
import { useQuery } from '@tanstack/solid-query' import { Suspense, createSignal } from 'solid-js' import { NoHydration } from 'solid-js/web' import { Title } from '@solidjs/meta' import type { UseQueryResult } from '@tanstack/solid-query' import { fetchUser } from '~/utils/api' export default function Hydration() { ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/routes/deferred.tsx
examples/solid/solid-start-streaming/src/routes/deferred.tsx
import { Title } from '@solidjs/meta' import { PostViewer } from '~/components/post-viewer' import { UserInfo } from '~/components/user-info' export default function Deferred() { return ( <main> <Title>Solid Query - Deferred</Title> <h1>Solid Query - Deferred Example</h1> <div class="descript...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/routes/index.tsx
examples/solid/solid-start-streaming/src/routes/index.tsx
import { Title } from '@solidjs/meta' export default function Home() { return ( <main> <Title>Solid Query v5</Title> <h1>Solid Query v5</h1> <p> This demo demonstrates how Solid Query can be used in SSR, with streaming support. Use the links in the top left to navigate between...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/routes/[...404].tsx
examples/solid/solid-start-streaming/src/routes/[...404].tsx
import { Title } from '@solidjs/meta' import { HttpStatusCode } from '@solidjs/start' export default function NotFound() { return ( <main> <Title>Not Found</Title> <HttpStatusCode code={404} /> <h1>Page Not Found</h1> <p> Visit{' '} <a href="https://start.solidjs.com" targ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/routes/batch-methods.tsx
examples/solid/solid-start-streaming/src/routes/batch-methods.tsx
import { notifyManager, useQuery } from '@tanstack/solid-query' import { createSignal } from 'solid-js' import { QueryBoundary } from '~/components/query-boundary' function sleep(milliseconds: number) { return new Promise((res) => setTimeout(res, milliseconds)) } function spin(milliseconds: number) { const start ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/routes/prefetch.tsx
examples/solid/solid-start-streaming/src/routes/prefetch.tsx
import { useQueryClient } from '@tanstack/solid-query' import { isServer } from 'solid-js/web' import { Title } from '@solidjs/meta' import { UserInfo, userInfoQueryOpts } from '~/components/user-info' export const route = { load: () => { const queryClient = useQueryClient() // Prefetching the user info and ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/routes/streamed.tsx
examples/solid/solid-start-streaming/src/routes/streamed.tsx
import { Title } from '@solidjs/meta' import { PostViewer } from '~/components/post-viewer' import { UserInfo } from '~/components/user-info' export default function Streamed() { return ( <main> <Title>Solid Query - Streamed</Title> <h1>Solid Query - Streamed Example</h1> <div class="descript...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/components/post-viewer.tsx
examples/solid/solid-start-streaming/src/components/post-viewer.tsx
import { useQuery } from '@tanstack/solid-query' import { resetErrorBoundaries } from 'solid-js' import { createSignal } from 'solid-js' import { For } from 'solid-js' import { Example } from './example' import { QueryBoundary } from './query-boundary' import type { Component } from 'solid-js' import { fetchPost } from...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/components/example.tsx
examples/solid/solid-start-streaming/src/components/example.tsx
import type { ParentComponent } from 'solid-js' export interface ExampleProps { title: string deferStream?: boolean sleep?: number } export const Example: ParentComponent<ExampleProps> = (props) => { return ( <div class="example"> <div class="example__header"> <div class="example__title">{pr...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/components/user-info.tsx
examples/solid/solid-start-streaming/src/components/user-info.tsx
import { useQuery } from '@tanstack/solid-query' import { createSignal } from 'solid-js' import { Example } from './example' import { QueryBoundary } from './query-boundary' import type { Component } from 'solid-js' import { fetchUser } from '~/utils/api' export interface UserInfoProps { deferStream?: boolean slee...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/components/query-boundary.tsx
examples/solid/solid-start-streaming/src/components/query-boundary.tsx
import { ErrorBoundary, Match, Suspense, Switch, children } from 'solid-js' import type { UseQueryResult } from '@tanstack/solid-query' import type { JSX } from 'solid-js' export interface QueryBoundaryProps<T = unknown> { query: UseQueryResult<T, Error> /** * Triggered when the data is initially loading. *...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/solid-start-streaming/src/utils/api.ts
examples/solid/solid-start-streaming/src/utils/api.ts
interface PostData { userId: number id: number title: string body: string } const doSleep = (ms: number) => new Promise((r) => setTimeout(r, ms)) export const fetchPost = async ({ postId, simulateError, sleep, }: { postId: number simulateError?: boolean sleep?: number }) => { console.info('[api]...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/default-query-function/vite.config.ts
examples/solid/default-query-function/vite.config.ts
import { defineConfig } from 'vite' import solid from 'vite-plugin-solid' export default defineConfig({ plugins: [solid()], })
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/default-query-function/src/index.tsx
examples/solid/default-query-function/src/index.tsx
/* @refresh reload */ import { QueryClient, QueryClientProvider, useQuery, } from '@tanstack/solid-query' import { SolidQueryDevtools } from '@tanstack/solid-query-devtools' import { For, Match, Show, Switch, createSignal } from 'solid-js' import { render } from 'solid-js/web' import type { Setter } from 'solid-j...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/basic/vite.config.ts
examples/solid/basic/vite.config.ts
import { defineConfig } from 'vite' import solid from 'vite-plugin-solid' export default defineConfig({ plugins: [solid()], })
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/basic/src/index.tsx
examples/solid/basic/src/index.tsx
/* @refresh reload */ import { QueryClient, QueryClientProvider, useQuery, } from '@tanstack/solid-query' import { SolidQueryDevtools } from '@tanstack/solid-query-devtools' import { For, Match, Switch, createSignal } from 'solid-js' import { render } from 'solid-js/web' import type { Component, Setter } from 'so...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/astro/src/env.d.ts
examples/solid/astro/src/env.d.ts
/// <reference path="../.astro/types.d.ts" /> /// <reference types="astro/client" />
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/astro/src/components/Link.tsx
examples/solid/astro/src/components/Link.tsx
export const Link = (props: { href: string children: any class?: string }) => { // Links doing client-side navigation return ( <a href={props.href} onClick={(e) => { e.preventDefault() history.pushState({}, '', props.href) window.dispatchEvent(new PopStateEvent('popstat...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/astro/src/components/SolidApp.tsx
examples/solid/astro/src/components/SolidApp.tsx
import { QueryClient, QueryClientProvider, keepPreviousData, useQuery, } from '@tanstack/solid-query' import { SolidQueryDevtools } from '@tanstack/solid-query-devtools' import { For, Show, Suspense, createContext, createSignal, useContext, } from 'solid-js' import { isServer } from 'solid-js/web' i...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/astro/src/utils/index.ts
examples/solid/astro/src/utils/index.ts
import { createSignal } from 'solid-js' export const getSearchParams = (init: string) => { const [search, setSearch] = createSignal(init) if (typeof window !== 'undefined') { window.addEventListener('popstate', () => { const location = window.location const params = new URLSearchParams(location.sea...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/basic-graphql-request/vite.config.ts
examples/solid/basic-graphql-request/vite.config.ts
import { defineConfig } from 'vite' import solid from 'vite-plugin-solid' export default defineConfig({ plugins: [solid()], })
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/basic-graphql-request/src/index.tsx
examples/solid/basic-graphql-request/src/index.tsx
/* @refresh reload */ import { QueryClient, QueryClientProvider, useQuery, } from '@tanstack/solid-query' import { SolidQueryDevtools } from '@tanstack/solid-query-devtools' import { For, Match, Switch, createSignal } from 'solid-js' import { render } from 'solid-js/web' import { gql, request } from 'graphql-requ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/simple/vite.config.ts
examples/solid/simple/vite.config.ts
import { defineConfig } from 'vite' import solid from 'vite-plugin-solid' export default defineConfig({ plugins: [solid()], })
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/solid/simple/src/index.tsx
examples/solid/simple/src/index.tsx
/* @refresh reload */ import { QueryClient, QueryClientProvider, useQuery, } from '@tanstack/solid-query' import { SolidQueryDevtools } from '@tanstack/solid-query-devtools' import { Match, Switch } from 'solid-js' import { render } from 'solid-js/web' const queryClient = new QueryClient() export default functi...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/angular/auto-refetching/src/main.ts
examples/angular/auto-refetching/src/main.ts
import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' bootstrapApplication(AppComponent, appConfig) .then(() => { // an simple endpoint for getting current list localStorage.setItem( 'tasks', ...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/angular/auto-refetching/src/app/app.config.ts
examples/angular/auto-refetching/src/app/app.config.ts
import { provideHttpClient, withFetch, withInterceptors, } from '@angular/common/http' import { QueryClient, provideTanStackQuery, } from '@tanstack/angular-query-experimental' import { withDevtools } from '@tanstack/angular-query-experimental/devtools' import { mockInterceptor } from './interceptor/mock-api....
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/angular/auto-refetching/src/app/app.component.ts
examples/angular/auto-refetching/src/app/app.component.ts
import { ChangeDetectionStrategy, Component } from '@angular/core' import { AutoRefetchingExampleComponent } from './components/auto-refetching.component' @Component({ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'app-root', template: `<auto-refetching-example />`, imports: [AutoRefetchingExample...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/angular/auto-refetching/src/app/services/tasks.service.ts
examples/angular/auto-refetching/src/app/services/tasks.service.ts
import { HttpClient } from '@angular/common/http' import { Injectable, inject } from '@angular/core' import { QueryClient, mutationOptions, queryOptions, } from '@tanstack/angular-query-experimental' import { lastValueFrom } from 'rxjs' @Injectable({ providedIn: 'root', }) export class TasksService { readon...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/angular/auto-refetching/src/app/components/auto-refetching.component.ts
examples/angular/auto-refetching/src/app/components/auto-refetching.component.ts
import { ChangeDetectionStrategy, Component, inject, signal, } from '@angular/core' import { injectMutation, injectQuery, } from '@tanstack/angular-query-experimental' import { NgStyle } from '@angular/common' import { TasksService } from '../services/tasks.service' @Component({ changeDetection: ChangeDe...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/angular/auto-refetching/src/app/interceptor/mock-api.interceptor.ts
examples/angular/auto-refetching/src/app/interceptor/mock-api.interceptor.ts
/** * MockApiInterceptor is used to simulate API responses for `/api/tasks` endpoints. * It handles the following operations: * - GET: Fetches all tasks from localStorage. * - POST: Adds a new task to localStorage. * - DELETE: Clears all tasks from localStorage. * Simulated responses include a delay to mimic netw...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/angular/query-options-from-a-service/src/main.ts
examples/angular/query-options-from-a-service/src/main.ts
import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err))
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false
TanStack/query
https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/examples/angular/query-options-from-a-service/src/app/app.config.ts
examples/angular/query-options-from-a-service/src/app/app.config.ts
import { provideHttpClient, withFetch } from '@angular/common/http' import { provideRouter, withComponentInputBinding } from '@angular/router' import { QueryClient, provideTanStackQuery, } from '@tanstack/angular-query-experimental' import { withDevtools } from '@tanstack/angular-query-experimental/devtools' impor...
typescript
MIT
f61647443da43639c58208d22ae8897b811d5dfc
2026-01-04T15:39:01.376912Z
false