With the following route setup:
import {type} from 'arktype'
const flightDetailSchema = type({
step: 'number',
option: 'number.integer',| #!/bin/zsh | |
| # measure-duck.sh — measure the macOS FaceTime audio-duck depth (digital loopback). | |
| # | |
| # Strategy: route system audio to External Headphones + BlackHole 16ch at once | |
| # (stacked multi-output), play a fixed 1 kHz tone, record BlackHole with and | |
| # without a FaceTime call, then compare RMS levels: | |
| # duck (dB) = RMS(no-call) - RMS(in-call) → that number is the unduck gain. | |
| # | |
| # Start here: ./measure-duck.sh guide (prints every step, human + machine) |
| ``` | |
| brew cleanup --prune=all | |
| rm -rf "$(brew --cache)" | |
| sudo npm cache clean --force | |
| rm -rf $(npm get cache)/_npx/* | |
| pnpm store prune | |
| pnpm cache delete | |
| yarn cache clean --all | |
| bun pm cache rm -g | |
| deno clean |
| function r(e) { | |
| var t, n; | |
| t = Array.prototype.forEach, | |
| n = Array.prototype.map, | |
| this.each = function(e, n, r) { | |
| if (null !== e) | |
| if (t && e.forEach === t) | |
| e.forEach(n, r); | |
| else if (e.length === +e.length) { | |
| for (var a = 0, i = e.length; a < i; a++) |
| import type {UseQueryOptions} from '@tanstack/react-query' | |
| export function getDepositWithdrawalHistoryQueryKey(params: { | |
| page: number | |
| limit: number | |
| }) { | |
| return [ | |
| 'deposit-withdrawal-history', | |
| params.page, | |
| params.limit, |
| interface Success<T> { | |
| result: T | |
| exception?: never | |
| } | |
| interface Failure { | |
| result?: never | |
| exception: {getError: () => unknown} | |
| } |
| You are an expert AI programming assistant that primarily focuses on producing clear, readable React and TypeScript code. | |
| You always use the latest stable, modern version of TypeScript, JavaScript, React, Node.js, Tanstack React Router, Tanstack React Query, HeroUI (formerly NextUI), Tailwind CSS, Vitest and you are familiar with the latest features, best practices and standards. Remember to check `package.json` to see our libraries/packages and make the full use of them. | |
| You keep your code clean, readable, and maintainable, fix all linting and formatting errors/warnings, and make sure the code is up to date with the latest standards. | |
| You carefully, slowly and methodically, step by step, and outline your reasoning to provide accurate, factual, thoughtful answers, and are a genius at reasoning ai to chat, to generate Code Style, Structure, Naming Conventions, TypeScript Usage, UI and Styling, Performance Optimization. | |
| You always check if a similar work has been done before, and if so, you would reference it to |
| import 'react' | |
| declare module 'react' { | |
| /* eslint-disable @typescript-eslint/no-explicit-any -- its intentional */ | |
| /* | |
| * Use this type to make sure that the callback passed will always be a memoized callback | |
| * For any function type, wrap it with MemoizedCallback<T> | |
| * Example: MemoizedCallback<(param: number) => boolean> | |
| */ | |
| // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -- its intentional |
| diff --git a/lib/utils/common.js b/lib/utils/common.js | |
| index 90415975e33ea77d161df0329d3ed2426977c404..aa02006b46bb6a5d9143d8b86679e782a9fc06f7 100644 | |
| --- a/lib/utils/common.js | |
| +++ b/lib/utils/common.js | |
| @@ -1,11 +1,14 @@ | |
| -"use strict"; | |
| +'use strict' | |
| + | |
| +const {get} = require('http') | |
| +const {type} = require('os') |
| type Data = { | |
| id: string; | |
| }; | |
| const data: Data = { | |
| id: "123", | |
| name: "Hello!", | |
| } | |
| const data2 = { |