Have a look at Ticket to see requirements
- Bugfix
- Feature
- Refactoring
| const thisIsCsssFunction = (args: string) => { | |
| return "foo"; | |
| }; | |
| // export const { defineAction, defineQuery, defineJob } = thisIsCsssFunction( | |
| // /*css*/ `.foo { color: red }` | |
| // ); | |
| const defineAction = <T extends string, K>(name: T, act: K) => { | |
| return { [name]: act } as { [P in T]: K }; |
| import prisma from "../dbClient.js"; | |
| import { getTasks } from "../ext-src/queries.js"; | |
| export default async function (args, context) { | |
| return (getTasks as any)(args, { | |
| ...context, | |
| entities: { | |
| Task: prisma.task, | |
| }, |
Have a look at Ticket to see requirements
| "use client"; | |
| import { useCallback, useRef } from "react"; | |
| import { css } from "../../../styled-system/css"; | |
| function useLongPress( | |
| callback: (e: React.MouseEvent | React.TouchEvent) => void, | |
| shortClick: () => void, | |
| duration: number = 500 | |
| ) { |
| console.log( | |
| JSON.stringify( | |
| Object.fromEntries( | |
| [...document.querySelectorAll(".config-vars tr")] | |
| .map((row) => [ | |
| row.querySelector(".config-var-key").value, | |
| row.querySelector(".config-var-value").value, | |
| ]) | |
| .filter((item) => !!item[0] && !!item[1]) | |
| ), |
| { | |
| // "editor.lineNumbers": "relative", | |
| "vim.insertModeKeyBindings": [{ "before": ["j", "k"], "after": ["<Esc>"] }], | |
| "vim.visualModeKeyBindings": [ | |
| { "before": ["B"], "after": ["^"] }, | |
| { "before": ["E"], "after": ["$"] } | |
| ], | |
| "vim.normalModeKeyBindings": [ | |
| { "before": ["B"], "after": ["^"] }, | |
| { "before": ["E"], "after": ["$"] }, |
| /* Hide "Home" */ | |
| div[aria-label="Home timeline"] > :first-child > div > div:first-child { | |
| display: none; | |
| } | |
| /* Hide "For you / Followoing" */ | |
| div[aria-label="Home timeline"] > :first-child > div > div:nth-child(2) { | |
| display: none; | |
| } |
| import sys | |
| import dataclasses | |
| @dataclasses.dataclass | |
| class Reindeer: | |
| name: str | |
| speed: int | |
| fly_time: int | |
| rest_time: int |
| const fastify = require("fastify"); | |
| const server = | |
| /** @type {import('fastify').FastifyInstance<any, IncomingMessage | Http2ServerRequest, ServerResponse<IncomingMessage> | Http2ServerResponse, FastifyBaseLogger, import('@fastify/type-provider-typebox').TypeBoxTypeProvider> } */ ( | |
| fastify().withTypeProvider() | |
| ); | |
| let ReturnSchema = { | |
| type: "object", | |
| properties: { |
| const { Type } = require("@sinclair/typebox"); | |
| import fastify from "fastify"; | |
| const server = | |
| /** @type {import('fastify').FastifyInstance<any, IncomingMessage | Http2ServerRequest, ServerResponse<IncomingMessage> | Http2ServerResponse, FastifyBaseLogger, import('@fastify/type-provider-typebox').TypeBoxTypeProvider> } */ ( | |
| fastify().withTypeProvider() | |
| ); | |
| const ReturnSchema = Type.Object({ |