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 |
|---|---|---|---|---|---|---|---|---|
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/findImports-namespace-type-1.ts | test/astx/findImports-namespace-type-1.ts | import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
import dedent from 'dedent-js'
astxTestcase({
file: __filename,
parsers: ['babel/tsx', 'recast/babel/tsx'],
input: dedent`
import * as Blah from 'foo'
import type * as Foo from 'foo'
`,
astx: ({ astx, report ... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/addImports-capture-added-named.ts | test/astx/addImports-capture-added-named.ts | import { expect } from 'chai'
import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
import dedent from 'dedent-js'
astxTestcase({
file: __filename,
input: dedent`
import { a } from 'a'
function foo() {
}
`,
astx: ({ astx }: TransformOptions): void => {
co... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/closestPredicate.ts | test/astx/closestPredicate.ts | import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
import dedent from 'dedent-js'
astxTestcase({
file: __filename,
parsers: ['babel', 'babel/tsx'],
input: dedent`
function foo(props) {
class X {
blah() {
useStyles()
}
}
}
... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/noChanges.ts | test/astx/noChanges.ts | import { astxTestcase } from '../astxTestcase'
astxTestcase({
file: __filename,
input: `
// foo
const bar = 1
`,
astx: (): void => {
// no-op
},
expected: `
// foo
const bar = 1
`,
})
| typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/addImports-relative.ts | test/astx/addImports-relative.ts | import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
import Path from 'path'
import dedent from 'dedent-js'
astxTestcase({
file: __filename,
transformFile: Path.resolve(__filename, '..', 'foo/transform.ts'),
input: dedent`
import {a} from '../a'
import {b} from 'b'
... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/findImports-namespace-value-1.ts | test/astx/findImports-namespace-value-1.ts | import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
import dedent from 'dedent-js'
astxTestcase({
file: __filename,
parsers: ['babel/tsx', 'recast/babel/tsx'],
input: dedent`
import type * as Foo from 'foo'
import * as Blah from 'foo'
`,
astx: ({ astx, report ... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/bugs_nesting.ts | test/astx/bugs_nesting.ts | import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
import dedent from 'dedent-js'
astxTestcase({
file: __filename,
input: dedent`
const validator = t.ref(() => t.object({
a: t.ref(() => Foo)
}))
`,
parsers: ['babel', 'babel/tsx'],
astx: ({ astx }: Transf... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/findImports-named-type-4.ts | test/astx/findImports-named-type-4.ts | import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
import dedent from 'dedent-js'
astxTestcase({
file: __filename,
// parsers: ['babel/tsx'],
input: dedent`
import Foo, {foo as bar, baz} from 'foo'
import type Foob from 'foo'
`,
astx: ({ astx, report }: Trans... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/bugs_withStylesRefactor.ts | test/astx/bugs_withStylesRefactor.ts | import dedent from 'dedent-js'
import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
astxTestcase({
file: __filename,
parsers: ['babel/tsx'],
input: dedent`
import * as React from 'react'
import { NavLink } from 'react-router-dom'
import ListItem from '@material-... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/bugs_replaceStaticClassProperty.ts | test/astx/bugs_replaceStaticClassProperty.ts | import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
astxTestcase({
file: __filename,
input: `
class Connection extends Model<ConnectionAttributes, ConnectionInitAttributes> {
declare Channels: Array<ConnectionChannel>;
static Channels: Association.HasMany<
Connection... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/importBinding.ts | test/astx/importBinding.ts | import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
export const input = `
import blah from '@jcoreio/require-env'
blah('TEST')
requireEnv('TEST2')
$requireEnv('TEST3')
`
export function astx({ astx, report }: TransformOptions): void {
const {
$requireEnv,
} = astx.fin... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/stringCapture.ts | test/astx/stringCapture.ts | import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
export const input = `
import a from 'b'
import c from 'd'
`
export function astx({ astx, report }: TransformOptions): void {
for (const { $$$i, $s } of astx.find`import {$$$i} from '$s'`) {
report({
$$$i: $$$i.code... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
codemodsquad/astx | https://github.com/codemodsquad/astx/blob/c76c2219fd40bdbd1c75dc8aa0ac13da14a56910/test/astx/addImports-before-first-statement.ts | test/astx/addImports-before-first-statement.ts | import { TransformOptions } from '../../src'
import { astxTestcase } from '../astxTestcase'
import dedent from 'dedent-js'
astxTestcase({
file: __filename,
input: dedent`
function foo() {
}
const bar = 2
`,
astx: ({ astx }: TransformOptions): void => {
astx.addImports`
import c, {type d... | typescript | MIT | c76c2219fd40bdbd1c75dc8aa0ac13da14a56910 | 2026-01-05T05:01:15.024820Z | false |
Eyevinn/webrtc-player | https://github.com/Eyevinn/webrtc-player/blob/fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0/src/index.ts | src/index.ts | import { Adapter } from './adapters/Adapter';
import {
AdapterFactory,
AdapterFactoryFunction
} from './adapters/AdapterFactory';
import { EventEmitter } from 'events';
import { CSAIManager } from '@eyevinn/csai-manager';
export { ListAvailableAdapters } from './adapters/AdapterFactory';
enum Message {
NO_MEDIA... | typescript | MIT | fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0 | 2026-01-05T05:01:16.009366Z | false |
Eyevinn/webrtc-player | https://github.com/Eyevinn/webrtc-player/blob/fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0/src/adapters/WHPPAdapter.ts | src/adapters/WHPPAdapter.ts | import { Adapter, AdapterConnectOptions } from './Adapter';
import { WHPPClient } from '@eyevinn/whpp-client';
export class WHPPAdapter implements Adapter {
private client: WHPPClient | undefined = undefined;
private localPeer: RTCPeerConnection | undefined = undefined;
private channelUrl: URL;
private debug =... | typescript | MIT | fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0 | 2026-01-05T05:01:16.009366Z | false |
Eyevinn/webrtc-player | https://github.com/Eyevinn/webrtc-player/blob/fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0/src/adapters/AdapterFactory.ts | src/adapters/AdapterFactory.ts | import { Adapter } from './Adapter';
import { WHPPAdapter } from './WHPPAdapter';
import { EyevinnAdapter } from './EyevinnAdapter';
import { WHEPAdapter } from './WHEPAdapter';
import { MediaConstraints } from '../index';
export interface AdapterFactoryFunction {
(
peer: RTCPeerConnection,
channelUrl: URL,
... | typescript | MIT | fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0 | 2026-01-05T05:01:16.009366Z | false |
Eyevinn/webrtc-player | https://github.com/Eyevinn/webrtc-player/blob/fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0/src/adapters/Adapter.ts | src/adapters/Adapter.ts | const DEFAULT_CONNECT_TIMEOUT = 2000;
export interface AdapterConnectOptions {
timeout: number;
}
export interface Adapter {
enableDebug(): void;
getPeer(): RTCPeerConnection | undefined;
resetPeer(newPeer: RTCPeerConnection): void;
connect(opts?: AdapterConnectOptions): Promise<void>;
disconnect(): Promi... | typescript | MIT | fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0 | 2026-01-05T05:01:16.009366Z | false |
Eyevinn/webrtc-player | https://github.com/Eyevinn/webrtc-player/blob/fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0/src/adapters/WHEPAdapter.ts | src/adapters/WHEPAdapter.ts | import { Adapter, AdapterConnectOptions } from './Adapter';
import { MediaConstraints } from '../index';
const DEFAULT_CONNECT_TIMEOUT = 2000;
export enum WHEPType {
Client,
Server
}
export class WHEPAdapter implements Adapter {
private localPeer: RTCPeerConnection | undefined;
private channelUrl: URL;
pri... | typescript | MIT | fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0 | 2026-01-05T05:01:16.009366Z | false |
Eyevinn/webrtc-player | https://github.com/Eyevinn/webrtc-player/blob/fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0/src/adapters/EyevinnAdapter.ts | src/adapters/EyevinnAdapter.ts | import { Adapter, AdapterConnectOptions } from './Adapter';
const DEFAULT_CONNECT_TIMEOUT = 2000;
export class EyevinnAdapter implements Adapter {
private localPeer: RTCPeerConnection | undefined;
private channelUrl: URL;
private debug: boolean;
private iceGatheringTimeout: any;
private waitingForCandidates... | typescript | MIT | fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0 | 2026-01-05T05:01:16.009366Z | false |
Eyevinn/webrtc-player | https://github.com/Eyevinn/webrtc-player/blob/fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0/demo/demo.ts | demo/demo.ts | import { WebRTCPlayer, ListAvailableAdapters } from '../src/index';
interface PacketsLost {
[type: string]: number;
}
const BROADCASTER_URL =
process.env.BROADCASTER_URL ||
'https://broadcaster.lab.sto.eyevinn.technology:8443/broadcaster';
const WHEP_URL =
process.env.WHEP_URL ||
'https://srtwhep.lab.sto.ey... | typescript | MIT | fcd2e45cddc69649c6c7dc3db86e93c2efb8a6c0 | 2026-01-05T05:01:16.009366Z | false |
argoproj-labs/argocd-bot | https://github.com/argoproj-labs/argocd-bot/blob/e11e6edfe2390ea239a42c1303f781a3c400bc89/index.ts | index.ts | const prHandler = require("./src/handle-pr-request");
module.exports = app => {
// issue_comment.created is triggered when someone makes a comment on a PullRequest or an Issue
app.on(["issue_comment.created"], prHandler.handlePrComment);
app.on(["pull_request.closed"], prHandler.handlePrClosed);
}
| typescript | Apache-2.0 | e11e6edfe2390ea239a42c1303f781a3c400bc89 | 2026-01-05T05:01:17.025497Z | false |
argoproj-labs/argocd-bot | https://github.com/argoproj-labs/argocd-bot/blob/e11e6edfe2390ea239a42c1303f781a3c400bc89/src/singleton-pr-lock.ts | src/singleton-pr-lock.ts | // Singleton lock object shared by bot, this is to prevent multiple PR's from running at the same time
export class SingletonPrLock {
private static instance;
private activePrName: string;
private activePrNumber: number;
private locked: boolean;
constructor() {
if (typeof SingletonPrLock.... | typescript | Apache-2.0 | e11e6edfe2390ea239a42c1303f781a3c400bc89 | 2026-01-05T05:01:17.025497Z | false |
argoproj-labs/argocd-bot | https://github.com/argoproj-labs/argocd-bot/blob/e11e6edfe2390ea239a42c1303f781a3c400bc89/src/to.ts | src/to.ts | export function to(promise) {
return promise.then(data => {
return [null, data];
})
.catch(err => {
return [err, null];
});
}
| typescript | Apache-2.0 | e11e6edfe2390ea239a42c1303f781a3c400bc89 | 2026-01-05T05:01:17.025497Z | false |
argoproj-labs/argocd-bot | https://github.com/argoproj-labs/argocd-bot/blob/e11e6edfe2390ea239a42c1303f781a3c400bc89/src/argo-bot.ts | src/argo-bot.ts | import { PrLock } from "./singleton-pr-lock";
import { ArgoAPI } from "./argo-api";
import { ArgoBotConfig } from "./argo-bot-config";
import { to } from "./to";
// bot command that triggers this bot to wake up
const BotCommand = "argo";
// supported actions, must be prefixed by BotCommand for example 'argo unlock'
... | typescript | Apache-2.0 | e11e6edfe2390ea239a42c1303f781a3c400bc89 | 2026-01-05T05:01:17.025497Z | false |
argoproj-labs/argocd-bot | https://github.com/argoproj-labs/argocd-bot/blob/e11e6edfe2390ea239a42c1303f781a3c400bc89/src/handle-pr-request.ts | src/handle-pr-request.ts | module.exports = {
handlePrClosed,
handlePrComment,
};
import { ArgoBot } from "./argo-bot";
import { PrLock } from "./singleton-pr-lock";
import * as getConfig from "probot-config";
// TODO use yaml file instead of node env in the future
/*const CONFIG_FILE = "argocd-bot.yaml"
const DEFAULT_CONFIG = {
rep... | typescript | Apache-2.0 | e11e6edfe2390ea239a42c1303f781a3c400bc89 | 2026-01-05T05:01:17.025497Z | false |
argoproj-labs/argocd-bot | https://github.com/argoproj-labs/argocd-bot/blob/e11e6edfe2390ea239a42c1303f781a3c400bc89/src/argo-api.ts | src/argo-api.ts | import * as nodeFetch from "node-fetch";
export class ArgoAPI {
private context;
private token;
private serverIP;
private fetchAllAppsFilter;
private fetchAutoSyncAppsFilter;
constructor(appContext, token, serverIP) {
this.context = appContext;
this.token = token;
this... | typescript | Apache-2.0 | e11e6edfe2390ea239a42c1303f781a3c400bc89 | 2026-01-05T05:01:17.025497Z | false |
argoproj-labs/argocd-bot | https://github.com/argoproj-labs/argocd-bot/blob/e11e6edfe2390ea239a42c1303f781a3c400bc89/src/argo-bot-config.ts | src/argo-bot-config.ts | // class that holds config params used by bot, for now this is reading from node env variables;
export class ArgoBotConfig {
private config;
constructor() {
this.config = process.env;
}
public getAPIToken() {
return this.config.ARGOCD_AUTH_TOKEN;
}
public getServerIP() {
... | typescript | Apache-2.0 | e11e6edfe2390ea239a42c1303f781a3c400bc89 | 2026-01-05T05:01:17.025497Z | false |
argoproj-labs/argocd-bot | https://github.com/argoproj-labs/argocd-bot/blob/e11e6edfe2390ea239a42c1303f781a3c400bc89/test/argo.diff.test.ts | test/argo.diff.test.ts | import * as sinon from "sinon"
import * as nock from "nock"
import { Probot } from 'probot'
const ArgocdBot = require("..")
// test fixtures
const payloadPr1 = require("./fixtures/issue_comment.created.pr1.json")
const payloadPr1Closed = require("./fixtures/pull_request.closed.pr1.json")
const payloadPr1UnlockComment... | typescript | Apache-2.0 | e11e6edfe2390ea239a42c1303f781a3c400bc89 | 2026-01-05T05:01:17.025497Z | false |
argoproj-labs/argocd-bot | https://github.com/argoproj-labs/argocd-bot/blob/e11e6edfe2390ea239a42c1303f781a3c400bc89/test/argo.misc.test.ts | test/argo.misc.test.ts | import * as sinon from "sinon"
import * as nock from "nock"
import { Probot } from "probot"
const ArgocdBot = require("..")
// test fixtures
const payloadPr1 = require("./fixtures/issue_comment.created.pr1.json")
const payloadPr1Closed = require("./fixtures/pull_request.closed.pr1.json")
const payloadPr1UnlockComment... | typescript | Apache-2.0 | e11e6edfe2390ea239a42c1303f781a3c400bc89 | 2026-01-05T05:01:17.025497Z | false |
argoproj-labs/argocd-bot | https://github.com/argoproj-labs/argocd-bot/blob/e11e6edfe2390ea239a42c1303f781a3c400bc89/test/argo.pr_locking.test.ts | test/argo.pr_locking.test.ts | import * as sinon from "sinon"
import * as nock from "nock"
import { Probot } from "probot"
const ArgocdBot = require("..")
import { PrLock } from "../src/singleton-pr-lock"
// test fixtures
const payloadPr1 = require("./fixtures/issue_comment.created.pr1.json")
const payloadPr1Closed = require("./fixtures/pull_reque... | typescript | Apache-2.0 | e11e6edfe2390ea239a42c1303f781a3c400bc89 | 2026-01-05T05:01:17.025497Z | false |
dankeboy36/esp-exception-decoder | https://github.com/dankeboy36/esp-exception-decoder/blob/bcbdc4e4dc0bbef13dc4c065969c542b5af20c72/src/decodeParams.ts | src/decodeParams.ts | import path from 'node:path'
import { FQBN } from 'fqbn'
import {
createDecodeParams as trbrCreateDecodeParams,
type DecodeParams as TrbrDecodeParams,
} from 'trbr'
import type { BoardDetails, SketchFolder } from 'vscode-arduino-api'
import { access } from './utils'
export interface DecodeParams extends TrbrDeco... | typescript | MIT | bcbdc4e4dc0bbef13dc4c065969c542b5af20c72 | 2026-01-05T05:00:55.226350Z | false |
dankeboy36/esp-exception-decoder | https://github.com/dankeboy36/esp-exception-decoder/blob/bcbdc4e4dc0bbef13dc4c065969c542b5af20c72/src/utils.ts | src/utils.ts | import { promises as fs } from 'node:fs'
import { platform } from 'node:os'
import debug from 'debug'
const utilsDebug: Debug = debug('espExceptionDecoder:utils')
export interface Debug {
(message: string): void
}
export const isWindows = platform() === 'win32'
export const neverSignal = new AbortController().sig... | typescript | MIT | bcbdc4e4dc0bbef13dc4c065969c542b5af20c72 | 2026-01-05T05:00:55.226350Z | false |
dankeboy36/esp-exception-decoder | https://github.com/dankeboy36/esp-exception-decoder/blob/bcbdc4e4dc0bbef13dc4c065969c542b5af20c72/src/terminal.ts | src/terminal.ts | import path from 'node:path'
import debug from 'debug'
import { DecodeResult, decode, stringifyDecodeResult } from 'trbr'
import vscode from 'vscode'
import type {
ArduinoContext,
ChangeEvent,
SketchFolder,
SketchFoldersChangeEvent,
} from 'vscode-arduino-api'
import {
DecodeParams,
DecodeParamsError,
c... | typescript | MIT | bcbdc4e4dc0bbef13dc4c065969c542b5af20c72 | 2026-01-05T05:00:55.226350Z | false |
dankeboy36/esp-exception-decoder | https://github.com/dankeboy36/esp-exception-decoder/blob/bcbdc4e4dc0bbef13dc4c065969c542b5af20c72/src/extension.ts | src/extension.ts | import vscode from 'vscode'
import type { ArduinoContext } from 'vscode-arduino-api'
import { activateDecoderTerminal } from './terminal'
export function activate(context: vscode.ExtensionContext): void {
findArduinoContext()
.then((arduinoContext) => {
if (arduinoContext) {
activateDecoderTermina... | typescript | MIT | bcbdc4e4dc0bbef13dc4c065969c542b5af20c72 | 2026-01-05T05:00:55.226350Z | false |
dankeboy36/esp-exception-decoder | https://github.com/dankeboy36/esp-exception-decoder/blob/bcbdc4e4dc0bbef13dc4c065969c542b5af20c72/src/test/runTest.ts | src/test/runTest.ts | import path from 'node:path'
import { runTests } from '@vscode/test-electron'
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../')
// The path to test r... | typescript | MIT | bcbdc4e4dc0bbef13dc4c065969c542b5af20c72 | 2026-01-05T05:00:55.226350Z | false |
dankeboy36/esp-exception-decoder | https://github.com/dankeboy36/esp-exception-decoder/blob/bcbdc4e4dc0bbef13dc4c065969c542b5af20c72/src/test/suite/decodeParams.test.ts | src/test/suite/decodeParams.test.ts | import assert from 'node:assert/strict'
import { promises as fs } from 'node:fs'
import path from 'node:path'
import temp from 'temp'
import {
DecodeParamsError,
__tests,
createDecodeParams,
} from '../../decodeParams'
import { isWindows } from '../../utils'
import { mockBoardDetails, mockCompileSummary, mockSk... | typescript | MIT | bcbdc4e4dc0bbef13dc4c065969c542b5af20c72 | 2026-01-05T05:00:55.226350Z | false |
dankeboy36/esp-exception-decoder | https://github.com/dankeboy36/esp-exception-decoder/blob/bcbdc4e4dc0bbef13dc4c065969c542b5af20c72/src/test/suite/terminal.test.ts | src/test/suite/terminal.test.ts | import assert from 'node:assert/strict'
import path from 'node:path'
import { FQBN } from 'fqbn'
import vscode from 'vscode'
import { DecodeParamsError } from '../../decodeParams'
import { __tests } from '../../terminal'
import { mockArduinoContext } from './mock'
const {
openTerminal,
decodeTerminalTitle,
str... | typescript | MIT | bcbdc4e4dc0bbef13dc4c065969c542b5af20c72 | 2026-01-05T05:00:55.226350Z | false |
dankeboy36/esp-exception-decoder | https://github.com/dankeboy36/esp-exception-decoder/blob/bcbdc4e4dc0bbef13dc4c065969c542b5af20c72/src/test/suite/mock.ts | src/test/suite/mock.ts | import vscode from 'vscode'
import type {
ArduinoContext,
ArduinoState,
BoardDetails,
BuildProperties,
ChangeEvent,
CliConfig,
CompileSummary,
SketchFolder,
SketchFoldersChangeEvent,
} from 'vscode-arduino-api'
export function mockArduinoContext(
options: {
currentSketch?: SketchFolder
open... | typescript | MIT | bcbdc4e4dc0bbef13dc4c065969c542b5af20c72 | 2026-01-05T05:00:55.226350Z | false |
dankeboy36/esp-exception-decoder | https://github.com/dankeboy36/esp-exception-decoder/blob/bcbdc4e4dc0bbef13dc4c065969c542b5af20c72/src/test/suite/index.ts | src/test/suite/index.ts | /* eslint-disable import/newline-after-import */
// Enable `debug` coloring in VS Code _Debug Console_
// https://github.com/debug-js/debug/issues/641#issuecomment-490706752
import path from 'node:path'
import debug from 'debug'
import { glob } from 'glob'
import Mocha, { MochaOptions } from 'mocha'
;(process as any).... | typescript | MIT | bcbdc4e4dc0bbef13dc4c065969c542b5af20c72 | 2026-01-05T05:00:55.226350Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/backend/types.d.ts | backend/types.d.ts | type Query = {
token: string,
tglogin: TGLogin,
request_query: {
chat_id: number,
msg_id: number,
timestamp: number,
signature: string
}
}
type FallbackQuery = {
token: string,
tglogin: TelegramLoginData,
request_query: {
chat_id: number,
msg_id: number,
user_id: number,
t... | typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/backend/app.ts | backend/app.ts | /// <reference path = "types.d.ts" />
import Dotenv from "dotenv"
import { Bot, Context } from "grammy"
import { Fluent } from "@moebius/fluent"
import { FluentContextFlavor, useFluent } from "@grammyjs/fluent"
import Debug from "debug"
import Koa from "koa"
import Router from "koa-router"
import KoaBody from "koa-body... | typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/backend/func/signature.ts | backend/func/signature.ts | import crypto from "crypto"
import Debug from "debug"
const print = Debug("tgwd:utils/signature.ts")
export default async (msgId: number, chatId: number, userId: number, joinTime: number): Promise<string> => {
let signOri = `${msgId}, ${chatId}, ${userId}, ${joinTime}`
print(signOri)
// signOri = Array.from(sig... | typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/backend/func/verify-login.ts | backend/func/verify-login.ts | import Debug from "debug"
import crypto from "crypto"
import Dotenv from "dotenv"
const print = Debug("tgwd:func/verify-login.ts")
Dotenv.config()
export default async (inputData: TGLogin, bottoken: string): Promise<Boolean> => {
const secret = crypto.createHmac('sha256', "WebAppData").update(bottoken).digest()
p... | typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/backend/func/verify-captcha.ts | backend/func/verify-captcha.ts | import axios from "axios"
import Debug from "debug"
const print = Debug("tgwd:func/verify-captcha.ts")
export default async (response: string): Promise<{ success: Boolean, error?: { code: number, alias: string } }> => {
let data
try {
data = await axios({
method: "POST",
url: "https://challenges.c... | typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/backend/func/index.ts | backend/func/index.ts | import verifyCaptcha from "./verify-captcha"
import verifyLogin from "./verify-login"
import signature from "./signature"
import { verifyTelegramLogin } from "./verify-telegram-login"
export default {
verifyCaptcha,
verifyLogin,
verifyTelegramLogin,
signature
} | typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/backend/func/verify-telegram-login.ts | backend/func/verify-telegram-login.ts | import crypto from 'crypto'
/**
* Telegram Login Widget 数据结构
*/
export type TelegramLoginData = {
id: number
first_name: string
last_name?: string
username?: string
photo_url?: string
auth_date: number
hash: string
}
/**
* 验证 Telegram Login Widget 返回的数据
*
* 使用与 Telegram WebApp initData 相同的验证算法:
* ... | typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/frontend-vue3/env.d.ts | frontend-vue3/env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/frontend-vue3/vite.config.ts | frontend-vue3/vite.config.ts | import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
allowe... | typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/frontend-vue3/src/main.ts | frontend-vue3/src/main.ts | declare global {
interface Window {
Telegram?: any;
}
}
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { createI18n } from 'vue-i18n'
import englishi18n from './locales/en/strings.json'
import simchinesei18n from './locales/zh-Hans/strings.json'
import mlchines... | typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
tg-watchdog/tg-watchdog | https://github.com/tg-watchdog/tg-watchdog/blob/76fc47f17f913dc4271aedbec02d0b054e0ec5e7/frontend-vue3/src/router/index.ts | frontend-vue3/src/router/index.ts | import { createRouter, createWebHistory } from 'vue-router'
import VerifyView from '../VerifyView.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'VerifyView',
component: VerifyView
}
]
})
export default router
| typescript | MIT | 76fc47f17f913dc4271aedbec02d0b054e0ec5e7 | 2026-01-05T05:01:18.149994Z | false |
markdown-confluence/obsidian-integration | https://github.com/markdown-confluence/obsidian-integration/blob/d04b9c506da92d144322b11cab5976a32b71d05b/src/custom.d.ts | src/custom.d.ts | declare module "*.txt" {
const content: string;
export default content;
}
declare module "*.json" {
const content: unknown;
export default content;
}
declare module "mermaid_renderer.esbuild" {
const content: Buffer;
export default content;
}
declare module "sort-any" {
// eslint-disable-next-line @typescript... | typescript | Apache-2.0 | d04b9c506da92d144322b11cab5976a32b71d05b | 2026-01-05T05:01:18.018993Z | false |
markdown-confluence/obsidian-integration | https://github.com/markdown-confluence/obsidian-integration/blob/d04b9c506da92d144322b11cab5976a32b71d05b/src/ConfluenceSettingTab.ts | src/ConfluenceSettingTab.ts | import { App, Setting, PluginSettingTab } from "obsidian";
import ConfluencePlugin from "./main";
export class ConfluenceSettingTab extends PluginSettingTab {
plugin: ConfluencePlugin;
constructor(app: App, plugin: ConfluencePlugin) {
super(app, plugin);
this.plugin = plugin;
}
display(): void {
const { co... | typescript | Apache-2.0 | d04b9c506da92d144322b11cab5976a32b71d05b | 2026-01-05T05:01:18.018993Z | false |
markdown-confluence/obsidian-integration | https://github.com/markdown-confluence/obsidian-integration/blob/d04b9c506da92d144322b11cab5976a32b71d05b/src/CompletedModal.tsx | src/CompletedModal.tsx | import { Modal, App } from "obsidian";
import ReactDOM from "react-dom";
import React, { useState } from "react";
import { UploadAdfFileResult } from "@markdown-confluence/lib";
export interface FailedFile {
fileName: string;
reason: string;
}
export interface UploadResults {
errorMessage: string | null;
failedFi... | typescript | Apache-2.0 | d04b9c506da92d144322b11cab5976a32b71d05b | 2026-01-05T05:01:18.018993Z | false |
markdown-confluence/obsidian-integration | https://github.com/markdown-confluence/obsidian-integration/blob/d04b9c506da92d144322b11cab5976a32b71d05b/src/ConfluencePerPageForm.tsx | src/ConfluencePerPageForm.tsx | import { Modal, App, FrontMatterCache } from "obsidian";
import ReactDOM from "react-dom";
import React, { useState, ChangeEvent } from "react";
import { ConfluencePageConfig } from "@markdown-confluence/lib";
import { Property } from "csstype";
export type ConfluencePerPageUIValues = {
[K in keyof ConfluencePageConf... | typescript | Apache-2.0 | d04b9c506da92d144322b11cab5976a32b71d05b | 2026-01-05T05:01:18.018993Z | false |
markdown-confluence/obsidian-integration | https://github.com/markdown-confluence/obsidian-integration/blob/d04b9c506da92d144322b11cab5976a32b71d05b/src/main.ts | src/main.ts | import { Plugin, Notice, MarkdownView, Workspace, loadMermaid } from "obsidian";
import {
ConfluenceUploadSettings,
Publisher,
ConfluencePageConfig,
StaticSettingsLoader,
renderADFDoc,
MermaidRendererPlugin,
UploadAdfFileResult,
} from "@markdown-confluence/lib";
import { ElectronMermaidRenderer } from "@markdow... | typescript | Apache-2.0 | d04b9c506da92d144322b11cab5976a32b71d05b | 2026-01-05T05:01:18.018993Z | false |
markdown-confluence/obsidian-integration | https://github.com/markdown-confluence/obsidian-integration/blob/d04b9c506da92d144322b11cab5976a32b71d05b/src/MyBaseClient.ts | src/MyBaseClient.ts | import {
Api,
Callback,
Client,
Config,
RequestConfig,
AuthenticationService,
} from "confluence.js";
import { requestUrl } from "obsidian";
import { RequiredConfluenceClient } from "@markdown-confluence/lib";
const ATLASSIAN_TOKEN_CHECK_FLAG = "X-Atlassian-Token";
const ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE = "no... | typescript | Apache-2.0 | d04b9c506da92d144322b11cab5976a32b71d05b | 2026-01-05T05:01:18.018993Z | false |
markdown-confluence/obsidian-integration | https://github.com/markdown-confluence/obsidian-integration/blob/d04b9c506da92d144322b11cab5976a32b71d05b/src/adaptors/obsidian.ts | src/adaptors/obsidian.ts | import { Vault, MetadataCache, App, TFile } from "obsidian";
import {
ConfluenceUploadSettings,
BinaryFile,
FilesToUpload,
LoaderAdaptor,
MarkdownFile,
ConfluencePageConfig,
} from "@markdown-confluence/lib";
import { lookup } from "mime-types";
export default class ObsidianAdaptor implements LoaderAdaptor {
va... | typescript | Apache-2.0 | d04b9c506da92d144322b11cab5976a32b71d05b | 2026-01-05T05:01:18.018993Z | false |
Brew-Brew/css-in-js-media | https://github.com/Brew-Brew/css-in-js-media/blob/8324b59912693a0b773fdf3a2c9bd2dd65add1d6/cssinjs-include-media.test.ts | cssinjs-include-media.test.ts | import includeMedia, {
setBreakPoints,
getBreakPoints,
} from "./cssinjs-inlclude-media";
describe("if param num is one", () => {
test("check <phone", () => {
expect(includeMedia("<phone")).toBe("@media (max-width: 374px)");
});
test("check >=tablet", () => {
expect(includeMedia(">=tablet")).toBe("@... | typescript | MIT | 8324b59912693a0b773fdf3a2c9bd2dd65add1d6 | 2026-01-05T05:01:17.689974Z | false |
Brew-Brew/css-in-js-media | https://github.com/Brew-Brew/css-in-js-media/blob/8324b59912693a0b773fdf3a2c9bd2dd65add1d6/index.d.ts | index.d.ts | // Type definitions for css-in-js-media
// Project: https://github.com/zx6658/css-in-js-media
// Definitions by: Ji-Hoon Lee <https://github.com/NoMoreViolence>, ideveloper<https://github.com/zx6658>
// TypeScript Version: 3.7.2
declare module "css-in-js-media" {
type BreakPoint =
| "smallPhone"
| "phone"
... | typescript | MIT | 8324b59912693a0b773fdf3a2c9bd2dd65add1d6 | 2026-01-05T05:01:17.689974Z | false |
Brew-Brew/css-in-js-media | https://github.com/Brew-Brew/css-in-js-media/blob/8324b59912693a0b773fdf3a2c9bd2dd65add1d6/cssinjs-inlclude-media.ts | cssinjs-inlclude-media.ts | interface BreakPoints {
smallPhone: number;
phone: number;
tablet: number;
desktop: number;
largeDesktop: number;
}
let breakpoints = {
smallPhone: 320,
phone: 375,
tablet: 768,
desktop: 1024,
largeDesktop: 1440,
};
const signRegex = /^[<=>]+/;
function throwError(): never {
throw "invalid medi... | typescript | MIT | 8324b59912693a0b773fdf3a2c9bd2dd65add1d6 | 2026-01-05T05:01:17.689974Z | false |
Brew-Brew/css-in-js-media | https://github.com/Brew-Brew/css-in-js-media/blob/8324b59912693a0b773fdf3a2c9bd2dd65add1d6/dist/cssinjs-include-media.test.d.ts | dist/cssinjs-include-media.test.d.ts | export {};
| typescript | MIT | 8324b59912693a0b773fdf3a2c9bd2dd65add1d6 | 2026-01-05T05:01:17.689974Z | false |
Brew-Brew/css-in-js-media | https://github.com/Brew-Brew/css-in-js-media/blob/8324b59912693a0b773fdf3a2c9bd2dd65add1d6/dist/cssinjs-inlclude-media.d.ts | dist/cssinjs-inlclude-media.d.ts | interface BreakPoints {
smallPhone: number;
phone: number;
tablet: number;
desktop: number;
largeDesktop: number;
}
/**
* get breakpoint list of css-in-js-media
*/
declare function getBreakPoints(): BreakPoints;
/**
* set break points of css-in-js-media library with custom param
* @param customi... | typescript | MIT | 8324b59912693a0b773fdf3a2c9bd2dd65add1d6 | 2026-01-05T05:01:17.689974Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/webpack.config.ts | webpack.config.ts | import { ConfigurationFactory } from 'webpack'
import path from 'path'
import CopyWebpackPlugin from 'copy-webpack-plugin'
const webpackConfig: ConfigurationFactory = () => {
return {
entry: {
main: path.join(__dirname, 'src', 'main.ts'),
},
output: {
path: path.join(__dirname, 'dist'),
... | typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/main.ts | src/main.ts | import { Breakout } from './game/breakout'
/**
* called on github page loaded
*/
function main() {
const svg = document.querySelector<SVGElement>('.js-calendar-graph-svg')
if (!svg) return
svg.setAttribute('height', '220')
new Breakout(svg) // initialize the game
}
main()
| typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/utils/domUtils.ts | src/utils/domUtils.ts | /**
* create SVG element
* @param type svg element type
* @param attrs attributes
* @param text textContent
*/
export function createShape(
type: string,
attrs: { [key: string]: string | number },
text = ''
) {
const el = document.createElementNS('http://www.w3.org/2000/svg', type)
Object.keys(attrs).for... | typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/utils/intersect.ts | src/utils/intersect.ts | import { Circle, Rect } from '../objects/shape'
export enum Direction {
X,
Y,
XY,
None,
}
/**
* collision detection with direction
* @param c circle
* @param r rectangle
*/
export function intersectDirection(c: Circle, r: Rect): Direction {
if (!intersect(c, r)) return Direction.None
if (r.left < c.x... | typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/utils/score.ts | src/utils/score.ts | /**
* save high score
* @param score
*/
export async function saveScore(score: number) {
if ((await getHighScore()) > score) return Promise.resolve()
else
return new Promise((resolve) =>
chrome.storage.sync.set({ [`score:${location.href}`]: score }, resolve)
)
}
/**
* return the high score on the... | typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/game/breakout.ts | src/game/breakout.ts | import { Ball } from '../objects/ball'
import { Block } from '../objects/block'
import { Game } from './game'
import { Direction, intersectDirection } from '../utils/intersect'
import { Player } from '../objects/player'
import { createButton, createDivElement, createShape } from '../utils/domUtils'
import { getHighScor... | typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/game/game.ts | src/game/game.ts | /**
* Call update on every animation frame
*/
export abstract class Game {
private lastUpdtae = 0
protected startGameLoop() {
this.lastUpdtae = Date.now()
requestAnimationFrame(() => this._update())
}
_update() {
this.update((Date.now() - this.lastUpdtae) / 1000)
this.lastUpdtae = Date.now()... | typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/objects/shape.ts | src/objects/shape.ts | export interface Circle {
x: number
y: number
r: number
}
export interface Rect {
left: number
right: number
top: number
bottom: number
}
| typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/objects/block.ts | src/objects/block.ts | import { GameObject } from './gameObject'
import { Rect } from './shape'
export class Block implements GameObject, Rect {
blockElement: SVGElement
left: number
right: number
top: number
bottom: number
origianlLife: number
originalColorLevel: string
life: number
constructor(svgElement: SVGElement,... | typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/objects/player.ts | src/objects/player.ts | import { GameObject } from './gameObject'
import { Rect } from './shape'
import { createShape } from '../utils/domUtils'
/**
* player
*/
export class Player implements GameObject, Rect {
x = 0
y = 190
width = 70
height = 5
get left() {
return this.x
}
get right() {
return this.x + this.width
... | typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/objects/gameObject.ts | src/objects/gameObject.ts | export interface GameObject {
/**
* called in every animation frame.
* @param delta time elapsed since the last time update was called
*/
update(delta: number): void
}
| typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
SIY1121/github-breakout | https://github.com/SIY1121/github-breakout/blob/041d060e5cb0bfdd5b149146cad7c0e899534f63/src/objects/ball.ts | src/objects/ball.ts | import { GameObject } from './gameObject'
import { Direction } from '../utils/intersect'
import { Circle } from './shape'
import { createShape } from '../utils/domUtils'
const speed = 140
/**
* ball
*/
export class Ball implements GameObject, Circle {
svgElement: SVGElement
ballElement: SVGElement
x = 0
y ... | typescript | Apache-2.0 | 041d060e5cb0bfdd5b149146cad7c0e899534f63 | 2026-01-05T05:01:20.005835Z | false |
hbsgithub/deno-azure-openai-proxy | https://github.com/hbsgithub/deno-azure-openai-proxy/blob/4832d845eb35d37bc3eadd1918ada8ed7c4d0239/main.ts | main.ts | import { serve } from "https://deno.land/std@0.181.0/http/server.ts";
import { pooledMap } from "https://deno.land/std@0.182.0/async/pool.ts";
// The name of your Azure OpenAI Resource.
const resourceName:string = Deno.env.get("RESOURCE_NAME");
// The version of OpenAI API.
const apiVersion:string = Deno.env.get("API_... | typescript | MIT | 4832d845eb35d37bc3eadd1918ada8ed7c4d0239 | 2026-01-05T05:01:20.661347Z | false |
datalogui/datalog | https://github.com/datalogui/datalog/blob/893e103afa2782a9d58137eb88983ef1fda0eae8/src/view-ext.ts | src/view-ext.ts | import { View, RecentDatum } from './datalog'
import * as datalog from './datalog'
/**
* A function that does some effect. It's up to you to undo that effect when you
* get a Removed kind of RecentDatum
*/
type EffectFn<T> = (t: RecentDatum<T>) => void
export type Indexed<T> = { index: number, datum: T }
export i... | typescript | Apache-2.0 | 893e103afa2782a9d58137eb88983ef1fda0eae8 | 2026-01-05T05:01:21.407245Z | false |
datalogui/datalog | https://github.com/datalogui/datalog/blob/893e103afa2782a9d58137eb88983ef1fda0eae8/src/datalog.ts | src/datalog.ts | import { ViewExt, Impl as ViewExtImpl } from "./view-ext";
export const Unconstrained = Symbol('Unconstrained')
type ValueOf<T> = T[keyof T];
type Tupleized<T> = Array<ValueOf<T>>
type TupleizedUnconstrained<T> = Array<ValueOf<T> | typeof Unconstrained>
type DEBUG_LEVEL_ENUM = 0 | 1 | 2
const DEBUG_LEVEL = 0
/**
... | typescript | Apache-2.0 | 893e103afa2782a9d58137eb88983ef1fda0eae8 | 2026-01-05T05:01:21.407245Z | true |
datalogui/datalog | https://github.com/datalogui/datalog/blob/893e103afa2782a9d58137eb88983ef1fda0eae8/src/datalog.test.ts | src/datalog.test.ts | import * as datalog from './datalog'
import { SingleItemView, IndexedImpl } from './view-ext'
function intoAddedDatums<T>(v: Array<T>): Array<datalog.RecentDatum<T>> {
return v.map(datum => ({ kind: datalog.Added, datum }))
}
type PersonID = number
describe('Relation', () => {
const newPerson = () => new dat... | typescript | Apache-2.0 | 893e103afa2782a9d58137eb88983ef1fda0eae8 | 2026-01-05T05:01:21.407245Z | true |
datalogui/datalog | https://github.com/datalogui/datalog/blob/893e103afa2782a9d58137eb88983ef1fda0eae8/src/view-ext.test.ts | src/view-ext.test.ts | import * as datalog from './datalog'
import { Added, Modified, Removed } from './datalog'
import * as ViewExt from './view-ext'
describe("Map", () => {
test("maps simple values", () => {
const table = datalog.intoTable([
{ n: 0 },
{ n: 1 },
{ n: 2 },
])
const view = table.view()
con... | typescript | Apache-2.0 | 893e103afa2782a9d58137eb88983ef1fda0eae8 | 2026-01-05T05:01:21.407245Z | false |
datalogui/datalog | https://github.com/datalogui/datalog/blob/893e103afa2782a9d58137eb88983ef1fda0eae8/src/index.ts | src/index.ts | export {
Added,
ArrayType,
BoolType,
MaterializedTable,
Modified,
NumberType,
ObjectType,
QueryFn,
RecentDatum,
Removed,
StringType,
Table,
View,
intoTable,
newTable,
query,
} from './datalog'
export {
Impl,
Indexed,
IndexedImpl,
IndexedViewExt,
SingleItemView,
ViewExt,
} fr... | typescript | Apache-2.0 | 893e103afa2782a9d58137eb88983ef1fda0eae8 | 2026-01-05T05:01:21.407245Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/.fatherrc.ts | .fatherrc.ts | export default {
esm: {
type: 'babel',
importLibToEs: true
},
cjs: 'babel',
extraBabelPlugins: [
[
'import',
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true
}
]
]
};
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/.walrusrc.ts | .walrusrc.ts | import { Config } from '@walrus/cli';
const config: Config = {
entry: {
ignore: ['.umi', '.umi-production','common', 'components', 'hooks', 'interface', 'theme', 'style', 'locale']
}
};
export default config;
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/.umirc.ts | .umirc.ts | import { join } from 'path';
export default {
mode: 'site',
title: 'Ant Design Plus',
favicon: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
navs: {
'zh-CN': [null, { title: 'GitHub', path: 'https://gith... | typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/typings.d.ts | src/typings.d.ts | declare module '*.css';
declare module '*.less';
declare module '*.svg';
declare module '*.png';
declare module '*.jpg';
declare module '*.jpeg';
declare module '*.gif';
declare module '*.bmp';
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/index.ts | src/index.ts | // 此文件在构建时会自动更新,请勿手动修改!
import Authorized from './authorized';
import ButtonList from './button-list';
import ConfigProvider from './config-provider';
import DaysRange from './days-range';
import ErrorBoundary from './error-boundary';
import FitText from './fit-text';
import Fullscreen from './fullscreen';
import Rang... | typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/scrollable-bar/utils.ts | src/scrollable-bar/utils.ts | import { CSSProperties } from 'react';
/**
* 设置Transform
* @param style
* @param value
*/
export function setTransform(style: CSSProperties, value) {
style.transform = value;
style['webkitTransform'] = value;
style['mozTransform'] = value;
}
/**
*
* @param style
*/
export function isTransform3dSupported(... | typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/scrollable-bar/item.tsx | src/scrollable-bar/item.tsx | import React, { CSSProperties, forwardRef } from 'react';
import classNames from 'classnames';
export interface ItemProps {
prefixCls?: string;
className?: string;
style?: CSSProperties;
key?: string;
children?: any;
onClick?: (key: string) => void;
}
const Item = forwardRef<HTMLDivElement, ItemProps>((pr... | typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/scrollable-bar/index.tsx | src/scrollable-bar/index.tsx | import ScrollableBar from './scrollable-bar';
export default ScrollableBar;
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/scrollable-bar/scrollable-bar.tsx | src/scrollable-bar/scrollable-bar.tsx | import React, {
FC,
CSSProperties,
Children,
ReactNode,
cloneElement,
useRef,
useState,
useEffect,
useCallback
} from 'react';
import debounce from 'lodash/debounce';
import classNames from 'classnames';
import { LeftOutlined, RightOutlined } from '@ant-design/icons';
import ResizeObserver from 'resiz... | typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/scrollable-bar/style/index.ts | src/scrollable-bar/style/index.ts | import './index.less';
import './item.less';
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/scrollable-bar/demo/demo1.tsx | src/scrollable-bar/demo/demo1.tsx | import React, { FC } from 'react';
import { Button } from 'antd';
import { ScrollableBar } from '@alitajs/antd-plus';
import './style.less';
const Example: FC = () => {
const defaultData = [1, 2, 3];
const [data, setData] = React.useState(defaultData);
const handleAddClick = () => {
setData([...data, data.l... | typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/scrollable-bar/demo/demo2.tsx | src/scrollable-bar/demo/demo2.tsx | import React, { FC, useEffect, useState } from 'react';
import { ScrollableBar } from '@alitajs/antd-plus';
import './style.less';
const Example: FC = () => {
const data = ['1', '2', '3', '4', '5', '6', '7'];
const [activeKey, setActiveKey] = useState(undefined);
useEffect(() => {
setActiveKey(data[4]);
}... | typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/watermark/index.tsx | src/watermark/index.tsx | import Watermark from '@pansy/react-watermark';
export * from '@pansy/react-watermark';
export default Watermark;
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/watermark/style/index.tsx | src/watermark/style/index.tsx | import './index.less';
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/watermark/demo/demo-03.tsx | src/watermark/demo/demo-03.tsx | import React, { useState } from 'react';
import { Button } from 'antd';
import { Watermark } from '@alitajs/antd-plus';
export default () => {
const [status, setStatus] = useState<boolean>(false);
return (
<div>
<Button
onClick={() => { setStatus(!status) }}
>
{status ? '销毁' : '创建'... | typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/watermark/demo/demo-01.tsx | src/watermark/demo/demo-01.tsx | import React from 'react';
import { Button } from 'antd';
import { Watermark } from '@alitajs/antd-plus';
export default () => {
return (
<div style={{ width: '100%', height: 500, position: 'relative' }}>
<Button type="primary">确认</Button>
<Watermark text="测试水印" />
</div>
);
};
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/watermark/demo/demo-02.tsx | src/watermark/demo/demo-02.tsx | import React from 'react';
import { Watermark } from '@alitajs/antd-plus';
export default () => {
return (
<div style={{ position: 'relative', width: '100%', height: 500 }} >
<Watermark text={['张某某', '2020-08-08 12:00:00']} />
</div>
);
};
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/fit-text/fit-text.tsx | src/fit-text/fit-text.tsx | import React, { Component } from 'react';
export interface FitTextProps {
// 通过调整这个变量来增加/减少字体大小
compressor?: number;
// 最小的字体大小
minFontSize?: number;
// 最大的字体大小
maxFontSize?: number;
children: React.ReactNode;
}
class FitText extends Component<FitTextProps> {
private updateQueued: boolean = false;
/... | typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/fit-text/index.ts | src/fit-text/index.ts | import FitText from './fit-text';
export default FitText;
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
alitajs/ant-design-plus | https://github.com/alitajs/ant-design-plus/blob/8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60/src/fit-text/style/index.ts | src/fit-text/style/index.ts | import '../../style/index.less';
| typescript | MIT | 8a37f7aa5dff2ebdfe0b583ad2a34d75d01a5b60 | 2026-01-05T05:01:20.733925Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.