type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
InterfaceDeclaration
/** * Wraps sampling parameters for a WebGL texture */ export interface SamplingParameters { /** * Magnification mode when upsampling from a WebGL texture */ magFilter?: TextureMagFilter; /** * Minification mode when upsampling from a WebGL texture */ minFilter?: TextureM...
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
EnumDeclaration
/** * WebGL Pixel Formats */ export const enum PixelFormat { DEPTH_COMPONENT = 0x1902, ALPHA = 0x1906, RGB = 0x1907, RGBA = 0x1908, LUMINANCE = 0x1909, LUMINANCE_ALPHA = 0x190a, }
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
EnumDeclaration
/** * WebGL Pixel Types */ export const enum PixelType { UNSIGNED_BYTE = 0x1401, UNSIGNED_SHORT_4_4_4_4 = 0x8033, UNSIGNED_SHORT_5_5_5_1 = 0x8034, UNSIGNED_SHORT_5_6_5 = 0x8363, }
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
EnumDeclaration
/** * WebGL Texture Magnification Filter */ export const enum TextureMagFilter { NEAREST = 0x2600, LINEAR = 0x2601, }
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
EnumDeclaration
/** * WebGL Texture Minification Filter */ export const enum TextureMinFilter { NEAREST = 0x2600, LINEAR = 0x2601, NEAREST_MIPMAP_NEAREST = 0x2700, LINEAR_MIPMAP_NEAREST = 0x2701, NEAREST_MIPMAP_LINEAR = 0x2702, LINEAR_MIPMAP_LINEAR = 0x2703, }
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
EnumDeclaration
/** * WebGL Texture Wrap Modes */ export const enum TextureWrapMode { REPEAT = 0x2901, CLAMP_TO_EDGE = 0x812f, MIRRORED_REPEAT = 0x8370, }
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
TypeAliasDeclaration
/** * Represents a valid WebGL texture source for use in texImage2D */ export type TextureSource = TextureData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
TypeAliasDeclaration
/** * A generic set of texture mipmaps (where index 0 has the largest dimension) */ export type Mipmaps<T> = Array<T>;
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
TypeAliasDeclaration
/** * A set of 6 cubemap arranged in the order [+x, -x, +y, -y, +z, -z] */ export type Faces<T> = Array<T>;
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
TypeAliasDeclaration
/** * A set of texture mipmaps specifically for 2D textures in WebGL (where index 0 has the largest dimension) */ export type Mipmaps2D = Mipmaps<TextureSource>;
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
TypeAliasDeclaration
/** * A set of texture mipmaps specifically for cubemap textures in WebGL (where index 0 has the largest dimension) */ export type MipmapsCube = Mipmaps<Faces<TextureSource>>;
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
MethodDeclaration
/** * Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters. * If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created. * The advantage of this is to enable working with texture objects wit...
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
MethodDeclaration
/** * Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields * @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field) * @param param...
CGHWorker/Babylon.js
Viewer/src/labs/texture.ts
TypeScript
ClassDeclaration
@NgModule({ imports: [CommonModule, A11yModule, McCommonModule], exports: [McToggleComponent], declarations: [McToggleComponent] }) export class McToggleModule { }
Di-did-done/mosaic
packages/mosaic/toggle/toggle.module.ts
TypeScript
ClassDeclaration
@Injectable() export class CreateProfileMapper { public request(request: CreateProfileRequest): Partial<Profile> { return { gender: request.gender, emailId: request.emailId, city: request.city, }; } }
Madhan-vj/typeorm-relations
src/modules/profile/create-profile/create-profile-mapper.ts
TypeScript
MethodDeclaration
public request(request: CreateProfileRequest): Partial<Profile> { return { gender: request.gender, emailId: request.emailId, city: request.city, }; }
Madhan-vj/typeorm-relations
src/modules/profile/create-profile/create-profile-mapper.ts
TypeScript
ArrowFunction
() => { const intl = useIntl() const { register, formState: { errors: { chassisNumber: chassisNumberError }, }, } = useFormContext<CreateVehicleRequest>() return ( <Input label={intl.formatMessage({ defaultMessage: 'Chassis number', description: 'Chassis number fiel...
cantte/rusell-web
packages/vehicles/src/components/form/chassis-number.field.tsx
TypeScript
ArrowFunction
(evt) => { if (!(evt instanceof NavigationEnd)) { return; } window.scrollTo(0, 0); }
lndlwangwei/coreui-free-angular-admin-template
src/app/app.component.ts
TypeScript
ClassDeclaration
@Component({ // tslint:disable-next-line selector: 'body', template: '<router-outlet></router-outlet><app-alert></app-alert>' }) export class AppComponent implements OnInit { constructor(private router: Router) { } ngOnInit() { this.router.events.subscribe((evt) => { if (!(evt instanceof Navigatio...
lndlwangwei/coreui-free-angular-admin-template
src/app/app.component.ts
TypeScript
MethodDeclaration
ngOnInit() { this.router.events.subscribe((evt) => { if (!(evt instanceof NavigationEnd)) { return; } window.scrollTo(0, 0); }); }
lndlwangwei/coreui-free-angular-admin-template
src/app/app.component.ts
TypeScript
FunctionDeclaration
/** * Tap configuration in a Network Interface. * API Version: 2020-08-01. */ export function getNetworkInterfaceTapConfiguration(args: GetNetworkInterfaceTapConfigurationArgs, opts?: pulumi.InvokeOptions): Promise<GetNetworkInterfaceTapConfigurationResult> { if (!opts) { opts = {} } if (!opts.v...
pulumi-bot/pulumi-azure-native
sdk/nodejs/network/getNetworkInterfaceTapConfiguration.ts
TypeScript
InterfaceDeclaration
export interface GetNetworkInterfaceTapConfigurationArgs { /** * The name of the network interface. */ readonly networkInterfaceName: string; /** * The name of the resource group. */ readonly resourceGroupName: string; /** * The name of the tap configuration. */ re...
pulumi-bot/pulumi-azure-native
sdk/nodejs/network/getNetworkInterfaceTapConfiguration.ts
TypeScript
InterfaceDeclaration
/** * Tap configuration in a Network Interface. */ export interface GetNetworkInterfaceTapConfigurationResult { /** * A unique read-only string that changes whenever the resource is updated. */ readonly etag: string; /** * Resource ID. */ readonly id?: string; /** * The na...
pulumi-bot/pulumi-azure-native
sdk/nodejs/network/getNetworkInterfaceTapConfiguration.ts
TypeScript
ArrowFunction
async (): Promise<string[]> => { const disciplines = await AsyncStorage.getItem('customDisciplines') return disciplines ? JSON.parse(disciplines) : null }
digitalfabrik/lunes-app
src/services/AsyncStorage.ts
TypeScript
ArrowFunction
async (customDisciplines: string[]): Promise<void> => { await AsyncStorage.setItem('customDisciplines', JSON.stringify(customDisciplines)) }
digitalfabrik/lunes-app
src/services/AsyncStorage.ts
TypeScript
ArrowFunction
async (session: sessionData): Promise<void> => { await AsyncStorage.setItem(SESSION_KEY, JSON.stringify(session)) }
digitalfabrik/lunes-app
src/services/AsyncStorage.ts
TypeScript
ArrowFunction
async (): Promise<sessionData | null> => { const sessionJson = await AsyncStorage.getItem(SESSION_KEY) return sessionJson === null ? null : JSON.parse(sessionJson) }
digitalfabrik/lunes-app
src/services/AsyncStorage.ts
TypeScript
ArrowFunction
async (): Promise<void> => { await AsyncStorage.removeItem(SESSION_KEY) }
digitalfabrik/lunes-app
src/services/AsyncStorage.ts
TypeScript
ArrowFunction
async (exerciseKey: ExerciseKeyType, exercise: ExerciseType): Promise<void> => { await AsyncStorage.setItem(exerciseKey.toString(), JSON.stringify(exercise)) }
digitalfabrik/lunes-app
src/services/AsyncStorage.ts
TypeScript
ArrowFunction
async (exerciseKey: ExerciseKeyType): Promise<ExerciseType | null> => { const exerciseJson = await AsyncStorage.getItem(exerciseKey.toString()) return exerciseJson === null ? null : JSON.parse(exerciseJson) }
digitalfabrik/lunes-app
src/services/AsyncStorage.ts
TypeScript
ArrowFunction
async (exerciseKey: ExerciseKeyType): Promise<void> => { await AsyncStorage.removeItem(exerciseKey.toString()) }
digitalfabrik/lunes-app
src/services/AsyncStorage.ts
TypeScript
InterfaceDeclaration
export interface ExerciseType { [disciplineId: number]: { [word: string]: DocumentResultType } }
digitalfabrik/lunes-app
src/services/AsyncStorage.ts
TypeScript
InterfaceDeclaration
interface sessionData { id: number title: string numberOfWords: number exercise: number retryData?: { data: DocumentsType } results: [] }
digitalfabrik/lunes-app
src/services/AsyncStorage.ts
TypeScript
ArrowFunction
(value: unknown): string => { const coercedValue = coerceType(value); return coercedValue.toLowerCase(); }
stekycz/graphql-extra-scalars
src/scalars/uuid.ts
TypeScript
ArrowFunction
() => <hr css
lucymonie/repo-migration-testv2
apps-rendering/src/components/horizontalRule.tsx
TypeScript
ClassDeclaration
export class CreateScheduleRequest { readonly disciplineId: number; readonly grade: string; }
viniosilva/kairos-manager
src/schedule/dto/create-schedule.dto.ts
TypeScript
ClassDeclaration
export class CreateScheduleResponse extends CreateScheduleRequest { readonly id: number; }
viniosilva/kairos-manager
src/schedule/dto/create-schedule.dto.ts
TypeScript
FunctionDeclaration
export function createSnapToN(n: number): Type;
Abogical/DefinitelyTyped
types/ol/rotationconstraint.d.ts
TypeScript
FunctionDeclaration
export function createSnapToZero(opt_tolerance?: number): Type;
Abogical/DefinitelyTyped
types/ol/rotationconstraint.d.ts
TypeScript
FunctionDeclaration
export function disable(rotation: number, delta: number): number;
Abogical/DefinitelyTyped
types/ol/rotationconstraint.d.ts
TypeScript
FunctionDeclaration
export function none(rotation: number, delta: number): number;
Abogical/DefinitelyTyped
types/ol/rotationconstraint.d.ts
TypeScript
TypeAliasDeclaration
export type Type = ((param0: number, param1: number) => number);
Abogical/DefinitelyTyped
types/ol/rotationconstraint.d.ts
TypeScript
ArrowFunction
webview => { webview.showFind(); this._findWidgetVisible.set(true); }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
ArrowFunction
webview => webview.hideFind()
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
ArrowFunction
webview => { webview.runFindAction(previous); }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
ArrowFunction
webview => webview.reload()
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
ArrowFunction
focused => { if (focused && this._editorService.activeControl === this) { this.focus(); } }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
ArrowFunction
webview => webview.focus()
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
ArrowFunction
() => this._onDidFocusWebview.fire()
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
ClassDeclaration
export class WebviewEditor extends BaseEditor { public static readonly ID = 'WebviewEditor'; private readonly _scopedContextKeyService = this._register(new MutableDisposable<IContextKeyService>()); private _findWidgetVisible: IContextKey<boolean>; private _editorFrame?: HTMLElement; private _content?: HTMLEleme...
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
protected createEditor(parent: HTMLElement): void { this._editorFrame = parent; this._content = document.createElement('div'); parent.appendChild(this._content); }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
public dispose(): void { if (this._content) { this._content.remove(); this._content = undefined; } super.dispose(); }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
public showFind() { this.withWebview(webview => { webview.showFind(); this._findWidgetVisible.set(true); }); }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
public hideFind() { this._findWidgetVisible.reset(); this.withWebview(webview => webview.hideFind()); }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
public find(previous: boolean) { this.withWebview(webview => { webview.runFindAction(previous); }); }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
public reload() { this.withWebview(webview => webview.reload()); }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
public layout(dimension: DOM.Dimension): void { if (this.input && this.input instanceof WebviewEditorInput) { this.synchronizeWebviewContainerDimensions(this.input.webview, dimension); this.input.webview.layout(); } }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
public focus(): void { super.focus(); if (!this._onFocusWindowHandler.value) { // Make sure we restore focus when switching back to a VS Code window this._onFocusWindowHandler.value = this._windowService.onDidChangeFocus(focused => { if (focused && this._editorService.activeControl === this) { this....
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
public withWebview(f: (element: Webview) => void): void { if (this.input && this.input instanceof WebviewEditorInput) { f(this.input.webview); } }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
protected setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { const webview = this.input && (this.input as WebviewEditorInput).webview; if (webview) { if (visible) { webview.claim(this); } else { webview.release(this); } this.claimWebview(this.input as WebviewEditorInput...
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
public clearInput() { if (this.input && this.input instanceof WebviewEditorInput) { this.input.webview.release(this); } super.clearInput(); }
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
public async setInput(input: WebviewEditorInput, options: EditorOptions | undefined, token: CancellationToken): Promise<void> { if (this.input && this.input instanceof WebviewEditorInput) { this.input.webview.release(this); } await super.setInput(input, options, token); await input.resolve(); if (token.i...
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
private claimWebview(input: WebviewEditorInput): void { input.webview.claim(this); if (input.webview.options.enableFindWidget) { this._scopedContextKeyService.value = this._contextKeyService.createScoped(input.webview.container); this._findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindT...
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
private synchronizeWebviewContainerDimensions(webview: WebviewEditorOverlay, dimension?: DOM.Dimension) { const webviewContainer = webview.container; if (webviewContainer && webviewContainer.parentElement && this._editorFrame) { const frameRect = this._editorFrame.getBoundingClientRect(); const containerRect...
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
MethodDeclaration
private trackFocus(webview: WebviewEditorOverlay): void { this._webviewFocusTrackerDisposables.clear(); // Track focus in webview content const webviewContentFocusTracker = DOM.trackFocus(webview.container); this._webviewFocusTrackerDisposables.add(webviewContentFocusTracker); this._webviewFocusTrackerDispo...
DJGHOSTMACHINE/vscode
src/vs/workbench/contrib/webview/browser/webviewEditor.ts
TypeScript
ArrowFunction
() => { it('with missing remediation is not supported', async () => { const entity = generateEntityToFix( 'pip', 'requirements.txt', JSON.stringify({}), ); // @ts-ignore: for test purpose only delete entity.testResult.remediation; const res = await isSupported(entity); expec...
MaxMood96/snyk
packages/snyk-fix/test/unit/plugins/python/is-supported.spec.ts
TypeScript
ArrowFunction
async () => { const entity = generateEntityToFix( 'pip', 'requirements.txt', JSON.stringify({}), ); // @ts-ignore: for test purpose only delete entity.testResult.remediation; const res = await isSupported(entity); expect(res.supported).toBeFalsy(); }
MaxMood96/snyk
packages/snyk-fix/test/unit/plugins/python/is-supported.spec.ts
TypeScript
ArrowFunction
async () => { const entity = generateEntityToFix( 'poetry', 'pyproject.toml', JSON.stringify({}), ); // @ts-ignore: for test purpose only delete entity.testResult.remediation; // @ts-ignore: for test purpose only entity.testResult.remediation = { unresolved: [], up...
MaxMood96/snyk
packages/snyk-fix/test/unit/plugins/python/is-supported.spec.ts
TypeScript
ArrowFunction
async () => { const entity = generateEntityToFix( 'pip', 'requirements.txt', '-r prod.txt\nDjango==1.6.1', ); const res = await isSupported(entity); expect(res.supported).toBeTruthy(); }
MaxMood96/snyk
packages/snyk-fix/test/unit/plugins/python/is-supported.spec.ts
TypeScript
ArrowFunction
async () => { const entity = generateEntityToFix( 'pip', 'requirements.txt', '-c constraints.txt', ); const res = await isSupported(entity); expect(res.supported).toBeTruthy(); }
MaxMood96/snyk
packages/snyk-fix/test/unit/plugins/python/is-supported.spec.ts
TypeScript
ArrowFunction
async () => { const entity = generateEntityToFix('pip', 'requirements.txt', '-e .'); entity.testResult.remediation!.pin = { 'django@1.6.1': { upgradeTo: 'django@2.0.1', vulns: [], isTransitive: false, }, }; const res = await isSupported(entity); expect(res.suppor...
MaxMood96/snyk
packages/snyk-fix/test/unit/plugins/python/is-supported.spec.ts
TypeScript
ArrowFunction
({ onDismiss }: Props) => ( <Modal onDismiss={onDismiss}> <div className
craigwongva/craigbfui
src/components/SessionExpired.tsx
TypeScript
InterfaceDeclaration
interface Props { onDismiss() }
craigwongva/craigbfui
src/components/SessionExpired.tsx
TypeScript
FunctionDeclaration
// ----------------------------------------------------------------------------- export async function getProfile(identityId: string, profileId: string) { const sql = { text: ` SELECT id, name, email, is_default, created_at, updated_at FROM profile WHERE id = $2 AND identity_id = $1`, ...
emrahcom/galaxy
machines/eb-app-api/home/api/galaxy/lib/database/profile.ts
TypeScript
FunctionDeclaration
// ----------------------------------------------------------------------------- export async function getDefaultProfile(identityId: string) { const sql = { text: ` SELECT id, name, email, is_default, created_at, updated_at FROM profile WHERE identity_id = $1 AND is_default = true ...
emrahcom/galaxy
machines/eb-app-api/home/api/galaxy/lib/database/profile.ts
TypeScript
FunctionDeclaration
// ----------------------------------------------------------------------------- export async function listProfile( identityId: string, limit: number, offset: number, ) { const sql = { text: ` SELECT id, name, email, is_default, created_at, updated_at FROM profile WHERE identity_id = $1 ...
emrahcom/galaxy
machines/eb-app-api/home/api/galaxy/lib/database/profile.ts
TypeScript
FunctionDeclaration
// ----------------------------------------------------------------------------- export async function addProfile( identityId: string, name: string, email: string, isDefault = false, ) { const sql = { text: ` INSERT INTO profile (identity_id, name, email, is_default) VALUES ($1, $2, $3, $4) ...
emrahcom/galaxy
machines/eb-app-api/home/api/galaxy/lib/database/profile.ts
TypeScript
FunctionDeclaration
// ----------------------------------------------------------------------------- export async function delProfile(identityId: string, profileId: string) { const sql = { text: ` DELETE FROM profile WHERE id = $2 AND identity_id = $1 AND is_default = false RETURNING id, now() as at...
emrahcom/galaxy
machines/eb-app-api/home/api/galaxy/lib/database/profile.ts
TypeScript
FunctionDeclaration
// ----------------------------------------------------------------------------- export async function updateProfile( identityId: string, profileId: string, name: string, email: string, ) { const sql = { text: ` UPDATE profile SET name = $3, email = $4, updated_at = now...
emrahcom/galaxy
machines/eb-app-api/home/api/galaxy/lib/database/profile.ts
TypeScript
FunctionDeclaration
// ----------------------------------------------------------------------------- export async function setDefaultProfile(identityId: string, profileId: string) { // note: don't add an is_default checking into WHERE. user should set a // profile as default although it's already default to solve the duplicated // d...
emrahcom/galaxy
machines/eb-app-api/home/api/galaxy/lib/database/profile.ts
TypeScript
InterfaceDeclaration
// ----------------------------------------------------------------------------- interface profileRows { [index: number]: { id: string; name: string; email: string; is_default: boolean; created_at: string; updated_at: string; }; }
emrahcom/galaxy
machines/eb-app-api/home/api/galaxy/lib/database/profile.ts
TypeScript
ClassDeclaration
@Pipe({ name: 'duration', }) export class DurationPipe implements PipeTransform { transform(value: any): string { if (value) { return dayjs.duration(value).humanize(); } return ''; } }
Aligon42/tp-dev-ops
src/main/webapp/app/shared/date/duration.pipe.ts
TypeScript
MethodDeclaration
transform(value: any): string { if (value) { return dayjs.duration(value).humanize(); } return ''; }
Aligon42/tp-dev-ops
src/main/webapp/app/shared/date/duration.pipe.ts
TypeScript
FunctionDeclaration
export function WaitTracker(): WaitTrackerClass { if (waitTrackerInstance === undefined) { waitTrackerInstance = new WaitTrackerClass(); } return waitTrackerInstance; }
5-stones/n8n
packages/cli/src/WaitTracker.ts
TypeScript
ArrowFunction
() => { this.getwaitingExecutions(); }
5-stones/n8n
packages/cli/src/WaitTracker.ts
TypeScript
ArrowFunction
(execution) => execution.id.toString()
5-stones/n8n
packages/cli/src/WaitTracker.ts
TypeScript
ArrowFunction
() => { this.startExecution(executionId); }
5-stones/n8n
packages/cli/src/WaitTracker.ts
TypeScript
ArrowFunction
async () => { // Get the data to execute const fullExecutionDataFlatted = await Db.collections.Execution!.findOne(executionId); if (fullExecutionDataFlatted === undefined) { throw new Error(`The execution with the id "${executionId}" does not exist.`); } const fullExecutionData = ResponseHelper.un...
5-stones/n8n
packages/cli/src/WaitTracker.ts
TypeScript
ArrowFunction
(error) => { Logger.error( `There was a problem starting the waiting execution with id "${executionId}": "${error.message}"`, { executionId }, ); }
5-stones/n8n
packages/cli/src/WaitTracker.ts
TypeScript
ClassDeclaration
export class WaitTrackerClass { activeExecutionsInstance: ActiveExecutions.ActiveExecutions; private waitingExecutions: { [key: string]: { executionId: string; timer: NodeJS.Timeout; }; } = {}; mainTimer: NodeJS.Timeout; constructor() { this.activeExecutionsInstance = ActiveExecutions.getInstance()...
5-stones/n8n
packages/cli/src/WaitTracker.ts
TypeScript
MethodDeclaration
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types async getwaitingExecutions() { Logger.debug('Wait tracker querying database for waiting executions'); // Find all the executions which should be triggered in the next 70 seconds const findQuery: FindManyOptions<IExecutionFlattedDb> = { ...
5-stones/n8n
packages/cli/src/WaitTracker.ts
TypeScript
MethodDeclaration
async stopExecution(executionId: string): Promise<IExecutionsStopData> { if (this.waitingExecutions[executionId] !== undefined) { // The waiting execution was already sheduled to execute. // So stop timer and remove. clearTimeout(this.waitingExecutions[executionId].timer); delete this.waitingExecutions[e...
5-stones/n8n
packages/cli/src/WaitTracker.ts
TypeScript
MethodDeclaration
startExecution(executionId: string) { Logger.debug(`Wait tracker resuming execution ${executionId}`, { executionId }); delete this.waitingExecutions[executionId]; (async () => { // Get the data to execute const fullExecutionDataFlatted = await Db.collections.Execution!.findOne(executionId); if (fullEx...
5-stones/n8n
packages/cli/src/WaitTracker.ts
TypeScript
FunctionDeclaration
export default function UseBoolean(initial = false) { const [isOn, setIsOn] = useState(initial) const turnOn = () => setIsOn(true) const turnOff = () => setIsOn(false) return [isOn, turnOn, turnOff] as const }
navikt/testnorge
apps/dolly-frontend/src/main/js/src/utils/hooks/useBoolean.tsx
TypeScript
ArrowFunction
() => setIsOn(true)
navikt/testnorge
apps/dolly-frontend/src/main/js/src/utils/hooks/useBoolean.tsx
TypeScript
ArrowFunction
() => setIsOn(false)
navikt/testnorge
apps/dolly-frontend/src/main/js/src/utils/hooks/useBoolean.tsx
TypeScript
FunctionDeclaration
export default function MyProductVideo() { const {data} = useShopQuery({query: QUERY}); const firstMediaElement = data.products.edges[0].node.media.edges[0].node; if (firstMediaElement.mediaContentType === 'EXTERNAL_VIDEO') { return <ExternalVideo data={firstMediaElement} />; } }
M-Krilano/hydrogen
packages/hydrogen/src/components/ExternalVideo/examples/external-video.example.tsx
TypeScript
ArrowFunction
props => { const tablehead = props.columns.map(c => { return th(c, `${props.modelName}.${c}`); }); return ( <div className='row'> <div className='col-xs-12'> <Card> <div className='card-content'> <DynamicGuiComponent authorized={ props.authorizeAdd }> ...
domien96/SolvasFleet
frontend/src/javascripts/components/app/Listing.tsx
TypeScript
ArrowFunction
c => { return th(c, `${props.modelName}.${c}`); }
domien96/SolvasFleet
frontend/src/javascripts/components/app/Listing.tsx
TypeScript
InterfaceDeclaration
interface Props { onSelect: any; addNewRoute: string; fetchModels: any; modelName: string; columns: string[]; response: ListResponse; authorizeAdd: boolean; }
domien96/SolvasFleet
frontend/src/javascripts/components/app/Listing.tsx
TypeScript