With this gist, you can test multiple functions at a time. Functions are always loaded on-demand, so they're always up-to-date. TypeScript functions are supported out-of-the-box.
pnpm install esbuild -D
diff --git a/alias.js b/alias.js | |
index a2e9dddc6b19e5668d23b2b25a0718ee2a201c37..6d21587b4e771ffb406d6193d381076bc5c5f229 100644 | |
--- a/alias.js | |
+++ b/alias.js | |
@@ -98,7 +98,7 @@ function mapColumnsInSQLToAlias(query, alias) { | |
return mapColumnsInAliasedSQLToAlias(c, alias); | |
} | |
return c; | |
- })); | |
+ })).mapWith(query.decoder); |
import { sql, Subquery, WithSubquery, type SQL, type SQLWrapper } from 'drizzle-orm' | |
import type { SelectResultField } from 'drizzle-orm/query-builders/select.types' | |
type SelectResultFields<TSelectedFields extends Record<string, any>> = { | |
[K in keyof TSelectedFields]: TSelectedFields[K] extends SQLWrapper | |
? SelectResultField<TSelectedFields[K]> | |
: SQL<TSelectedFields[K]> | |
} | |
export function select<TAlias extends string, const TSelectedFields extends Record<string, any>>( |
// ==UserScript== | |
// @name YouTube Enhanced Interaction | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Enhanced click handling for YouTube recommendations | |
// @author You | |
// @match https://www.youtube.com/* | |
// @grant none | |
// ==/UserScript== |
This gist is a further condensed version of https://svelte.dev/llms-small.txt from https://svelte.dev/docs/llms
These sections were removed to optimize the context window. Each section was deemed non-critical for MVP purposes or its use cases were deemed too niche. When developing a brownfield Svelte app, many of these sections should not be removed.
SELECT DISTINCT | |
d.deptype, | |
from_table.relname AS classid, | |
COALESCE(from_class.relname, from_type.typname, from_proc.proname) AS objid, | |
from_attr.attname AS objsubid, | |
to_table.relname AS refclassid, | |
COALESCE(to_class.relname, to_type.typname, to_proc.proname, to_ext.extname, to_con.conname) AS refobjid, | |
to_attr.attname AS refobjsubid |
import { withCapacity } from 'radashi' | |
export function keyedCapacity<TKey, TResult>(capacity: number) { | |
const queue = withCapacity(capacity) | |
const jobs = new Map<TKey, Promise<TResult>>() | |
return { | |
keys: (): IterableIterator<TKey> => jobs.keys(), | |
get: (key: TKey): Promise<TResult> | undefined => jobs.get(key), | |
run(key: TKey, job: () => Promise<TResult>): Promise<TResult> { |
/** | |
* Merge multiple generators into a single generator. | |
*/ | |
function mergeGenerators<T>(generators: AsyncGenerator<T>[]): AsyncGenerator<T> | |
/** | |
* Merge multiple generators into a single generator. Whenever a generator | |
* yields, the `{done, value}` object is passed to `mapResult` to transform the | |
* value that will be yielded. |
/* | |
* API struct for a table AM. Note this must be allocated in a | |
* server-lifetime manner, typically as a static const struct, which then gets | |
* returned by FormData_pg_am.amhandler. | |
* | |
* In most cases it's not appropriate to call the callbacks directly, use the | |
* table_* wrapper functions instead. | |
* | |
* GetTableAmRoutine() asserts that required callbacks are filled in, remember | |
* to update when adding a callback. |