type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
InterfaceDeclaration
/** * Options used when adding a ConfigurationSetting. */ export interface AddConfigurationSettingOptions extends RequestOptionsBase {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Response from adding a ConfigurationSetting. */ export interface AddConfigurationSettingResponse extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Response from deleting a ConfigurationSetting. */ export interface DeleteConfigurationSettingResponse extends SyncTokenHeaderField, HttpResponseFields, HttpResponseField<SyncTokenHeaderField> {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Options for deleting a ConfigurationSetting. */ export interface DeleteConfigurationSettingOptions extends HttpConditionalFields, RequestOptionsBase {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Options used when saving a ConfigurationSetting. */ export interface SetConfigurationSettingOptions extends HttpConditionalFields, RequestOptionsBase {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Response from setting a ConfigurationSetting. */ export interface SetConfigurationSettingResponse extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Headers from getting a ConfigurationSetting. */ export interface GetConfigurationHeaders extends SyncTokenHeaderField { /** * A UTC datetime that specifies the last time the resource was modified. */ lastModifiedHeader?: string; }
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Response from retrieving a ConfigurationSetting. */ export interface GetConfigurationSettingResponse extends ConfigurationSetting, GetConfigurationHeaders, HttpResponseFields, HttpResponseField<GetConfigurationHeaders> { }
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Options for getting a ConfigurationSetting. */ export interface GetConfigurationSettingOptions extends RequestOptionsBase, HttpConditionalFields, OptionalFields { /** * Requests the server to respond with the state of the resource at the specified time. */ acceptDatetime?: string; }
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as * the accept date time header. */ export interface ListSettingsOptions extends OptionalFields { /** * Requests the server to respond with the state of the resource at the specified time. */ acceptDatetime?: string; /** * Filters for wildcard matching (using *) against keys. These conditions are logically OR'd against each other. */ keys?: string[]; /** * Filters for wildcard matching (using *) against labels. These conditions are logically OR'd against each other. */ labels?: string[]; }
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields. * Also provides `fields` which allows you to selectively choose which fields are populated in the * result. */ export interface ListConfigurationSettingsOptions extends RequestOptionsBase, ListSettingsOptions {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * A page of configuration settings and the corresponding HTTP response */ export interface ListConfigurationSettingPage extends HttpResponseField<SyncTokenHeaderField> { /** * The configuration settings for this page of results. */ items: ConfigurationSetting[]; }
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Options for listRevisions that allow for filtering based on keys, labels and other fields. * Also provides `fields` which allows you to selectively choose which fields are populated in the * result. */ export interface ListRevisionsOptions extends RequestOptionsBase, ListSettingsOptions {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * A page of configuration settings and the corresponding HTTP response */ export interface ListRevisionsPage extends HttpResponseField<SyncTokenHeaderField> { /** * The configuration settings for this page of results. */ items: ConfigurationSetting[]; }
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Options for clearReadOnly */ export interface ClearReadOnlyOptions extends HttpConditionalFields, RequestOptionsBase {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Response when clearing the read-only status from a value */ export interface ClearReadOnlyResponse extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Options for setReadOnly */ export interface SetReadOnlyOptions extends HttpConditionalFields, RequestOptionsBase {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
InterfaceDeclaration
/** * Response when setting a value to read-only. */ export interface SetReadOnlyResponse extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
TypeAliasDeclaration
/** * Standard base response for getting, deleting or updating a configuration setting */ export type ConfigurationSettingResponse<HeadersT> = ConfigurationSetting & HttpResponseField<HeadersT> & Pick<HeadersT, Exclude<keyof HeadersT, "eTag">>;
coolwine/azure-sdk-for-js
sdk/appconfiguration/app-configuration/src/models.ts
TypeScript
TypeAliasDeclaration
export type EventType = 'history-popped' | 'history-pushed' | 'request' | 'state';
bouzuya/mr-jums
src/common/event/event-type.ts
TypeScript
ArrowFunction
kubectl => { const ns: string = createNS() const inNamespace = `-n ${ns}` allocateNS(this, ns) xit('should create a pod', async () => { try { const selector: string = await CLI.command( `${kubectl} create -f ${remotePodYaml} ${inNamespace}`, this.app ).then(ReplExpect.okWithCustom({ selector: Selectors.BY_NAME('nginx') })) await waitForGreen(this.app, selector) } catch (err) { return Common.oops(this, true)(err) } }) const top1 = `${kubectl} top pod ${inNamespace}` xit(`should show that pod in a list via ${top1}`, () => { return CLI.command(top1, this.app) .then(ReplExpect.okWith('nginx')) .catch(Common.oops(this, true)) }) const top2 = `${kubectl} top ${inNamespace} pod` xit(`should show that pod in a list via ${top2}`, () => { return CLI.command(top1, this.app) .then(ReplExpect.okWith('nginx')) .catch(Common.oops(this, true)) }) xit(`should click on top row and show pod in sidecar using ${top1}`, async () => { try { await openSidecarByList(this, top1, 'nginx') } catch (err) { return Common.oops(this, true)(err) } }) deleteNS(this, ns) }
IBM/kui
plugins/plugin-kubectl/src/test/k8s4/top.ts
TypeScript
ArrowFunction
async () => { try { const selector: string = await CLI.command( `${kubectl} create -f ${remotePodYaml} ${inNamespace}`, this.app ).then(ReplExpect.okWithCustom({ selector: Selectors.BY_NAME('nginx') })) await waitForGreen(this.app, selector) } catch (err) { return Common.oops(this, true)(err) } }
IBM/kui
plugins/plugin-kubectl/src/test/k8s4/top.ts
TypeScript
ArrowFunction
() => { return CLI.command(top1, this.app) .then(ReplExpect.okWith('nginx')) .catch(Common.oops(this, true)) }
IBM/kui
plugins/plugin-kubectl/src/test/k8s4/top.ts
TypeScript
ArrowFunction
async () => { try { await openSidecarByList(this, top1, 'nginx') } catch (err) { return Common.oops(this, true)(err) } }
IBM/kui
plugins/plugin-kubectl/src/test/k8s4/top.ts
TypeScript
ArrowFunction
() => { const method = api.methods.create_dashboard const specKey = '4.0' let history: MemoryHistory let pushSpy: jasmine.Spy beforeEach(() => { history = createMemoryHistory() pushSpy = spyOn(history, 'push') }) test('it renders method and navigates on click', () => { renderWithTheme( <Router history={history}> <DiffMethodLink method={method} specKey={specKey} /> </Router> ) const s = `${method.name} for ${specKey}` expect(screen.getByText(s)).toBeInTheDocument() userEvent.click(screen.getByText(s)) act(() => { expect(pushSpy).toHaveBeenCalledWith( `/${specKey}/methods/${method.schema.tags[0]}/${method.name}` ) }) }) test('it renders missing method and does not navigate on click', () => { renderWithTheme( <Router history={history}> <DiffMethodLink method={undefined} specKey={specKey} /> </Router> ) const s = `Missing in ${specKey}` expect(screen.getByText(s)).toBeInTheDocument() userEvent.click(screen.getByText(s)) act(() => { expect(pushSpy).not.toHaveBeenCalled() }) }) }
aissaFoxtel/sdk-codegen
packages/api-explorer/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx
TypeScript
ArrowFunction
() => { history = createMemoryHistory() pushSpy = spyOn(history, 'push') }
aissaFoxtel/sdk-codegen
packages/api-explorer/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx
TypeScript
ArrowFunction
() => { renderWithTheme( <Router history={history}> <DiffMethodLink method={method} specKey={specKey} /> </Router> ) const s = `${method.name} for ${specKey}` expect(screen.getByText(s)).toBeInTheDocument() userEvent.click(screen.getByText(s)) act(() => { expect(pushSpy).toHaveBeenCalledWith( `/${specKey}/methods/${method.schema.tags[0]}/${method.name}` ) }) }
aissaFoxtel/sdk-codegen
packages/api-explorer/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx
TypeScript
ArrowFunction
() => { expect(pushSpy).toHaveBeenCalledWith( `/${specKey}/methods/${method.schema.tags[0]}/${method.name}` ) }
aissaFoxtel/sdk-codegen
packages/api-explorer/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx
TypeScript
ArrowFunction
() => { renderWithTheme( <Router history={history}> <DiffMethodLink method={undefined} specKey={specKey} /> </Router> ) const s = `Missing in ${specKey}` expect(screen.getByText(s)).toBeInTheDocument() userEvent.click(screen.getByText(s)) act(() => { expect(pushSpy).not.toHaveBeenCalled() }) }
aissaFoxtel/sdk-codegen
packages/api-explorer/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx
TypeScript
ArrowFunction
() => { expect(pushSpy).not.toHaveBeenCalled() }
aissaFoxtel/sdk-codegen
packages/api-explorer/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx
TypeScript
ArrowFunction
(res) => (this.resolveTransitionPromise = res)
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
ClassDeclaration
/** * @element sp-tray * * @slot - content to display within the Tray * * @fires close - Announces that the Tray has been closed. */ export class Tray extends SpectrumElement { public static get styles(): CSSResultArray { return [modalStyles, styles]; } @property({ type: Boolean, reflect: true }) public open = false; protected prefersMotion = new MatchMediaController( this, '(prefers-reduced-motion: no-preference)' ); private transitionPromise = Promise.resolve(); private resolveTransitionPromise!: () => void; @query('.tray') private tray!: HTMLDivElement; public focus(): void { const firstFocusable = firstFocusableIn(this); if (firstFocusable) { firstFocusable.focus(); } else if (this.children.length === 1) { this.tray.focus(); } else { super.focus(); } } public overlayWillCloseCallback(): boolean { if (!this.open) return false; this.close(); return true; } public close(): void { this.open = false; if (!this.prefersMotion.matches) { this.dispatchClosed(); } } private dispatchClosed(): void { this.dispatchEvent( new Event('close', { bubbles: true, }) ); } protected handleUnderlayTransitionend(): void { if (!this.open) { this.dispatchClosed(); this.resolveTransitionPromise(); } } protected handleTrayTransitionend(): void { if (this.open) { this.resolveTransitionPromise(); } } protected update(changes: PropertyValues<this>): void { if ( changes.has('open') && changes.get('open') !== undefined && this.prefersMotion.matches ) { this.transitionPromise = new Promise( (res) => (this.resolveTransitionPromise = res) ); } super.update(changes); } protected render(): TemplateResult { return html` <sp-underlay ?open=${this.open} @click=${this.close} @transitionend=${this.handleUnderlayTransitionend} ></sp-underlay> <div class="tray modal" tabindex="-1" @transitionend=${this.handleTrayTransitionend} > <slot></slot> </div> `; } /** * Bind the open/close transition into the update complete lifecycle so * that the overlay system can wait for it to be "visibly ready" before * attempting to throw focus into the content contained herein. Not * waiting for this can cause small amounts of page scroll to happen * while opening the Tray when focusable content is included: e.g. Menu * elements whose selected Menu Item is not the first Menu Item. */ protected async getUpdateComplete(): Promise<boolean> { const complete = (await super.getUpdateComplete()) as boolean; await this.transitionPromise; return complete; } }
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
MethodDeclaration
public focus(): void { const firstFocusable = firstFocusableIn(this); if (firstFocusable) { firstFocusable.focus(); } else if (this.children.length === 1) { this.tray.focus(); } else { super.focus(); } }
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
MethodDeclaration
public overlayWillCloseCallback(): boolean { if (!this.open) return false; this.close(); return true; }
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
MethodDeclaration
public close(): void { this.open = false; if (!this.prefersMotion.matches) { this.dispatchClosed(); } }
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
MethodDeclaration
private dispatchClosed(): void { this.dispatchEvent( new Event('close', { bubbles: true, }) ); }
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
MethodDeclaration
protected handleUnderlayTransitionend(): void { if (!this.open) { this.dispatchClosed(); this.resolveTransitionPromise(); } }
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
MethodDeclaration
protected handleTrayTransitionend(): void { if (this.open) { this.resolveTransitionPromise(); } }
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
MethodDeclaration
protected update(changes: PropertyValues<this>): void { if ( changes.has('open') && changes.get('open') !== undefined && this.prefersMotion.matches ) { this.transitionPromise = new Promise( (res) => (this.resolveTransitionPromise = res) ); } super.update(changes); }
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
MethodDeclaration
protected render(): TemplateResult { return html` <sp-underlay ?open=${this.open} @click=${this.close} @transitionend=${this.handleUnderlayTransitionend} ></sp-underlay> <div class="tray modal" tabindex="-1" @transitionend=${this.handleTrayTransitionend} > <slot></slot> </div> `; }
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
MethodDeclaration
/** * Bind the open/close transition into the update complete lifecycle so * that the overlay system can wait for it to be "visibly ready" before * attempting to throw focus into the content contained herein. Not * waiting for this can cause small amounts of page scroll to happen * while opening the Tray when focusable content is included: e.g. Menu * elements whose selected Menu Item is not the first Menu Item. */ protected async getUpdateComplete(): Promise<boolean> { const complete = (await super.getUpdateComplete()) as boolean; await this.transitionPromise; return complete; }
kchobantonov/spectrum-web-components
packages/tray/src/Tray.ts
TypeScript
FunctionDeclaration
function LeftSide() { return ( <div className={style.content_left}> <div className={style.content_left__created}> <Created /> </div> <div className={style.content_left__cards}> {buyout.map((el, idx) => { return ( <BuyoutCard key={idx} title={el.title} value={el.value} image={el.image} customStyle={'fixed'} /> ); })}
CatharsisNetwork/catharsis-interface
src/components/content/fractionalize/FractionalizeFixedPrice/LeftSide/LeftSide.tsx
TypeScript
ArrowFunction
(el, idx) => { return ( <BuyoutCard key={idx} title={el.title} value={el.value} image={el.image} customStyle={'fixed'} />
CatharsisNetwork/catharsis-interface
src/components/content/fractionalize/FractionalizeFixedPrice/LeftSide/LeftSide.tsx
TypeScript
ClassDeclaration
@Component({ selector: 'app-custom-dialog', templateUrl: './custom-dialog.component.html', }) export class CustomDialogComponent { constructor(@Inject(MAT_DIALOG_DATA) public data: DialogData) {} }
tanbt/weather-notification-frontend
src/app/custom-dialog/custom-dialog.component.ts
TypeScript
InterfaceDeclaration
export interface DialogData { title: string; messages: string[]; // Each mesage is in a separate paragraph }
tanbt/weather-notification-frontend
src/app/custom-dialog/custom-dialog.component.ts
TypeScript
FunctionDeclaration
async function evm( dispatch: any, enqueueSnackbar: any, signer: Signer, signedVAA: Uint8Array, chainId: ChainId, shouldUpdate: boolean ) { dispatch(setIsCreating(true)); try { const receipt = shouldUpdate ? await updateWrappedOnEth( getTokenBridgeAddressForChain(chainId), signer, signedVAA ) : await createWrappedOnEth( getTokenBridgeAddressForChain(chainId), signer, signedVAA ); dispatch( setCreateTx({ id: receipt.transactionHash, block: receipt.blockNumber }) ); enqueueSnackbar(null, { content: <Alert severity="success">Transaction confirmed</Alert>, }); }
0x0ece/wormhole
bridge_ui/src/hooks/useHandleCreateWrapped.tsx
TypeScript
FunctionDeclaration
async function solana( dispatch: any, enqueueSnackbar: any, wallet: WalletContextState, payerAddress: string, // TODO: we may not need this since we have wallet signedVAA: Uint8Array, shouldUpdate: boolean ) { dispatch(setIsCreating(true)); try { if (!wallet.signTransaction) { throw new Error("wallet.signTransaction is undefined"); } const connection = new Connection(SOLANA_HOST, "confirmed"); await postVaaSolanaWithRetry( connection, wallet.signTransaction, SOL_BRIDGE_ADDRESS, payerAddress, Buffer.from(signedVAA), MAX_VAA_UPLOAD_RETRIES_SOLANA ); const transaction = shouldUpdate ? await updateWrappedOnSolana( connection, SOL_BRIDGE_ADDRESS, SOL_TOKEN_BRIDGE_ADDRESS, payerAddress, signedVAA ) : await createWrappedOnSolana( connection, SOL_BRIDGE_ADDRESS, SOL_TOKEN_BRIDGE_ADDRESS, payerAddress, signedVAA ); const txid = await signSendAndConfirm(wallet, connection, transaction); // TODO: didn't want to make an info call we didn't need, can we get the block without it by modifying the above call? dispatch(setCreateTx({ id: txid, block: 1 })); enqueueSnackbar(null, { content: <Alert severity="success">Transaction confirmed</Alert>, }); }
0x0ece/wormhole
bridge_ui/src/hooks/useHandleCreateWrapped.tsx
TypeScript
FunctionDeclaration
async function terra( dispatch: any, enqueueSnackbar: any, wallet: ConnectedWallet, signedVAA: Uint8Array, shouldUpdate: boolean, feeDenom: string ) { dispatch(setIsCreating(true)); try { const msg = shouldUpdate ? await updateWrappedOnTerra( TERRA_TOKEN_BRIDGE_ADDRESS, wallet.terraAddress, signedVAA ) : await createWrappedOnTerra( TERRA_TOKEN_BRIDGE_ADDRESS, wallet.terraAddress, signedVAA ); const result = await postWithFees( wallet, [msg], "Wormhole - Create Wrapped", [feeDenom] ); dispatch( setCreateTx({ id: result.result.txhash, block: result.result.height }) ); enqueueSnackbar(null, { content: <Alert severity="success">Transaction confirmed</Alert>, }); }
0x0ece/wormhole
bridge_ui/src/hooks/useHandleCreateWrapped.tsx
TypeScript
FunctionDeclaration
export function useHandleCreateWrapped(shouldUpdate: boolean) { const dispatch = useDispatch(); const { enqueueSnackbar } = useSnackbar(); const targetChain = useSelector(selectAttestTargetChain); const solanaWallet = useSolanaWallet(); const solPK = solanaWallet?.publicKey; const signedVAA = useAttestSignedVAA(); const isCreating = useSelector(selectAttestIsCreating); const { signer } = useEthereumProvider(); const terraWallet = useConnectedWallet(); const terraFeeDenom = useSelector(selectTerraFeeDenom); const handleCreateClick = useCallback(() => { if (isEVMChain(targetChain) && !!signer && !!signedVAA) { evm( dispatch, enqueueSnackbar, signer, signedVAA, targetChain, shouldUpdate ); } else if ( targetChain === CHAIN_ID_SOLANA && !!solanaWallet && !!solPK && !!signedVAA ) { solana( dispatch, enqueueSnackbar, solanaWallet, solPK.toString(), signedVAA, shouldUpdate ); } else if (targetChain === CHAIN_ID_TERRA && !!terraWallet && !!signedVAA) { terra( dispatch, enqueueSnackbar, terraWallet, signedVAA, shouldUpdate, terraFeeDenom ); } else { // enqueueSnackbar( // "Creating wrapped tokens on this chain is not yet supported", // { // variant: "error", // } // ); } }, [ dispatch, enqueueSnackbar, targetChain, solanaWallet, solPK, terraWallet, signedVAA, signer, shouldUpdate, terraFeeDenom, ]); return useMemo( () => ({ handleClick: handleCreateClick, disabled: !!isCreating, showLoader: !!isCreating, }), [handleCreateClick, isCreating] ); }
0x0ece/wormhole
bridge_ui/src/hooks/useHandleCreateWrapped.tsx
TypeScript
ArrowFunction
() => { if (isEVMChain(targetChain) && !!signer && !!signedVAA) { evm( dispatch, enqueueSnackbar, signer, signedVAA, targetChain, shouldUpdate ); } else if ( targetChain === CHAIN_ID_SOLANA && !!solanaWallet && !!solPK && !!signedVAA ) { solana( dispatch, enqueueSnackbar, solanaWallet, solPK.toString(), signedVAA, shouldUpdate ); } else if (targetChain === CHAIN_ID_TERRA && !!terraWallet && !!signedVAA) { terra( dispatch, enqueueSnackbar, terraWallet, signedVAA, shouldUpdate, terraFeeDenom ); } else { // enqueueSnackbar( // "Creating wrapped tokens on this chain is not yet supported", // { // variant: "error", // } // ); } }
0x0ece/wormhole
bridge_ui/src/hooks/useHandleCreateWrapped.tsx
TypeScript
ArrowFunction
() => ({ handleClick: handleCreateClick, disabled: !!isCreating, showLoader: !!isCreating, })
0x0ece/wormhole
bridge_ui/src/hooks/useHandleCreateWrapped.tsx
TypeScript
MethodDeclaration
confirmed<
0x0ece/wormhole
bridge_ui/src/hooks/useHandleCreateWrapped.tsx
TypeScript
MethodDeclaration
parseError(e)
0x0ece/wormhole
bridge_ui/src/hooks/useHandleCreateWrapped.tsx
TypeScript
FunctionDeclaration
function imgFilter( domains: readonly string[], options: Options ): (md: Md) => void
traPtitech/traq-markdown-
src/types/markdown-it-image-filter.d.ts
TypeScript
InterfaceDeclaration
interface Options { httpsOnly: boolean }
traPtitech/traq-markdown-
src/types/markdown-it-image-filter.d.ts
TypeScript
TypeAliasDeclaration
export type DynamicPageKeyValue = { [key: string]: { file: string; regex: string; }; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
// Image optimization export type ImageConfig = { deviceSizes: number[]; imageSizes: number[]; loader: "default" | "imgix" | "cloudinary" | "akamai"; path: string; domains?: string[]; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type ImagesManifest = { version: number; images: ImageConfig; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type OriginRequestApiHandlerManifest = { apis: { dynamic: DynamicPageKeyValue; nonDynamic: { [key: string]: string; }; }; domainRedirects: { [key: string]: string; }; enableHTTPCompression: boolean; authentication?: { username: string; password: string; }; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type OriginRequestDefaultHandlerManifest = { buildId: string; distributionId: string; logLambdaExecutionTimes: boolean; pages: { ssr: { dynamic: DynamicPageKeyValue; nonDynamic: { [key: string]: string; }; }; html: { nonDynamic: { [path: string]: string; }; dynamic: DynamicPageKeyValue; }; }; publicFiles: { [key: string]: string; }; trailingSlash: boolean; enableHTTPCompression: boolean; domainRedirects: { [key: string]: string; }; authentication?: { username: string; password: string; }; canonicalHostname?: string; urlRewrites?: UrlRewriteList; enableDebugMode?: boolean; invalidationUrlGroups?: BasicInvalidationUrlGroup[]; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type OriginRequestImageHandlerManifest = { enableHTTPCompression: boolean; domainRedirects: { [key: string]: string; }; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type RevalidationEvent = { revalidate?: boolean; Records: [ { cf: { request: CloudFrontRequest; config: CloudFrontEvent["config"] } } ]; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type OriginRequestEvent = { revalidate?: boolean; Records: [ { cf: { request: CloudFrontRequest; config: CloudFrontEvent["config"] } } ]; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type OriginResponseEvent = { revalidate?: boolean; Records: [ { cf: { request: CloudFrontRequest; response: CloudFrontResponse; config: CloudFrontEvent["config"]; }; } ]; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type PreRenderedManifest = { version: 2; routes: { [route: string]: { initialRevalidateSeconds: number | false; srcRoute: string | null; dataRoute: string; }; }; dynamicRoutes: { [route: string]: { routeRegex: string; fallback: string | false; dataRoute: string; dataRouteRegex: string; }; }; preview: { previewModeId: string; previewModeSigningKey: string; previewModeEncryptionKey: string; }; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type RedirectData = { statusCode: number; source: string; destination: string; regex: string; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type RewriteData = { source: string; destination: string; regex: string; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type Header = { key: string; value: string; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type HeaderData = { source: string; headers: Header[]; regex: string; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type RoutesManifest = { basePath: string; redirects: RedirectData[]; rewrites: RewriteData[]; headers: HeaderData[]; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type PerfLogger = { now: () => number | undefined; log: (metricDescription: string, t1?: number, t2?: number) => void; };
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
TypeAliasDeclaration
export type UrlRewriteList = { originUrl: string; rewriteUrl: string }[];
getjerry/serverless-next.js
packages/libs/lambda-at-edge/types.d.ts
TypeScript
FunctionDeclaration
/** * Ensures that the assets of plugin packages are populated for a build. */ export function ensureAssets(options: IEnsureOptions): void { let { output, packageNames } = options; packageNames.forEach(function(name) { const packageDataPath = require.resolve(path.join(name, 'package.json')); const packageDir = path.dirname(packageDataPath); const packageData = utils.readJSONFile(packageDataPath); const extension = normalizeExtension(packageData); const { schemaDir, themeDir } = extension; // Handle schemas. if (schemaDir) { const schemas = glob.sync( path.join(path.join(packageDir, schemaDir), '*') ); const destination = path.join(output, 'schemas', name); // Remove the existing directory if necessary. if (fs.existsSync(destination)) { try { const oldPackagePath = path.join(destination, 'package.json.orig'); const oldPackageData = utils.readJSONFile(oldPackagePath); if (oldPackageData.version === packageData.version) { fs.removeSync(destination); } } catch (e) { fs.removeSync(destination); } } // Make sure the schema directory exists. fs.mkdirpSync(destination); // Copy schemas. schemas.forEach(schema => { const file = path.basename(schema); fs.copySync(schema, path.join(destination, file)); }); // Write the package.json file for future comparison. fs.copySync( path.join(packageDir, 'package.json'), path.join(destination, 'package.json.orig') ); } // Handle themes. if (themeDir) { const from = path.join(packageDir, themeDir); const destination = path.join(output, 'themes', name); // Remove the existing directory if necessary. if (fs.existsSync(destination)) { try { const oldPackageData = utils.readJSONFile( path.join(destination, 'package.json.orig') ); if (oldPackageData.version === packageData.version) { fs.removeSync(destination); } } catch (e) { fs.removeSync(destination); } } // Make sure the theme directory exists. fs.mkdirpSync(destination); // Copy the theme folder. fs.copySync(from, destination); // Write the package.json file for future comparison. fs.copySync( path.join(packageDir, 'package.json'), path.join(destination, 'package.json.orig') ); } }); }
perrinjerome/jupyterlab
buildutils/src/build.ts
TypeScript
FunctionDeclaration
/** * Returns JupyterLab extension metadata from a module. */ export function normalizeExtension(module: IModule): ILabExtension { let { jupyterlab, main, name } = module; main = main || 'index.js'; if (!jupyterlab) { throw new Error(`Module ${name} does not contain JupyterLab metadata.`); } let { extension, mimeExtension, schemaDir, themeDir } = jupyterlab; extension = extension === true ? main : extension; mimeExtension = mimeExtension === true ? main : mimeExtension; if (extension && mimeExtension && extension === mimeExtension) { const message = 'extension and mimeExtension cannot be the same export.'; throw new Error(message); } return { extension, mimeExtension, schemaDir, themeDir }; }
perrinjerome/jupyterlab
buildutils/src/build.ts
TypeScript
ArrowFunction
schema => { const file = path.basename(schema); fs.copySync(schema, path.join(destination, file)); }
perrinjerome/jupyterlab
buildutils/src/build.ts
TypeScript
InterfaceDeclaration
/** * The options used to ensure a root package has the appropriate * assets for its JupyterLab extension packages. */ export interface IEnsureOptions { /** * The output directory where the build assets should reside. */ output: string; /** * The names of the packages to ensure. */ packageNames: ReadonlyArray<string>; }
perrinjerome/jupyterlab
buildutils/src/build.ts
TypeScript
InterfaceDeclaration
/** * The JupyterLab extension attributes in a module. */ export interface ILabExtension { /** * Indicates whether the extension is a standalone extension. * * #### Notes * If `true`, the `main` export of the package is used. If set to a string * path, the export from that path is loaded as a JupyterLab extension. It * is possible for one package to have both an `extension` and a * `mimeExtension` but they cannot be identical (i.e., the same export * cannot be declared both an `extension` and a `mimeExtension`). */ readonly extension?: boolean | string; /** * Indicates whether the extension is a MIME renderer extension. * * #### Notes * If `true`, the `main` export of the package is used. If set to a string * path, the export from that path is loaded as a JupyterLab extension. It * is possible for one package to have both an `extension` and a * `mimeExtension` but they cannot be identical (i.e., the same export * cannot be declared both an `extension` and a `mimeExtension`). */ readonly mimeExtension?: boolean | string; /** * The local schema file path in the extension package. */ readonly schemaDir?: string; /** * The local theme file path in the extension package. */ readonly themeDir?: string; }
perrinjerome/jupyterlab
buildutils/src/build.ts
TypeScript
InterfaceDeclaration
/** * A minimal definition of a module's package definition (i.e., package.json). */ export interface IModule { /** * The JupyterLab metadata/ */ jupyterlab?: ILabExtension; /** * The main entry point in a module. */ main?: string; /** * The name of a module. */ name: string; }
perrinjerome/jupyterlab
buildutils/src/build.ts
TypeScript
ArrowFunction
( { site } ) => site.siteMetadata.siteUrl
tnorlund/Blog
src/utils/sitemap.ts
TypeScript
ArrowFunction
( { site, allSitePage } ) => allSitePage.nodes.map( node => ( { url: site.siteMetadata.siteUrl + node.path } ) )
tnorlund/Blog
src/utils/sitemap.ts
TypeScript
ArrowFunction
node => ( { url: site.siteMetadata.siteUrl + node.path } )
tnorlund/Blog
src/utils/sitemap.ts
TypeScript
ArrowFunction
( progressTrackerStages: ShallowWrapper<ProgressTrackerStageProps>, ) => { progressTrackerStages.forEach((stage, index) => { expect(stage.props().transitionDelay).toBe( (progressTrackerStages.length - 1 - index) * 50, ); }); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
(stage, index) => { expect(stage.props().transitionDelay).toBe( (progressTrackerStages.length - 1 - index) * 50, ); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
( progressTrackerStages: ShallowWrapper<ProgressTrackerStageProps>, ) => { progressTrackerStages.forEach((stage, index) => { expect(stage.props().transitionDelay).toBe(index * 50); expect(stage.props().transitionEasing).toBe('linear'); }); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
(stage, index) => { expect(stage.props().transitionDelay).toBe(index * 50); expect(stage.props().transitionEasing).toBe('linear'); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
( progressTrackerStages: ShallowWrapper<ProgressTrackerStageProps>, ) => { progressTrackerStages.forEach(stage => { expect(stage.props().transitionDelay).toBe(0); expect(stage.props().transitionEasing).toBe('cubic-bezier(0.15,1,0.3,1)'); }); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
stage => { expect(stage.props().transitionDelay).toBe(0); expect(stage.props().transitionEasing).toBe('cubic-bezier(0.15,1,0.3,1)'); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
() => { it('should render the component', () => { const wrapper = shallow(<ProgressTracker items={items} />); expect(wrapper.length).toBeGreaterThan(0); expect(wrapper.find(ProgressTrackerContainer)).toHaveLength(1); expect(wrapper.find(Grid)).toHaveLength(1); expect(wrapper.find(ThemeProvider)).toHaveLength(1); expect(wrapper.find(ProgressTrackerStage)).toHaveLength(6); }); it('should create default theme correctly', () => { const wrapper = shallow(<ProgressTracker items={items} />); expect(wrapper.find(ThemeProvider).props().theme).toMatchObject({ spacing: 'cosy', columns: 12, }); }); it('should set initial transition', () => { const wrapper = shallow(<ProgressTracker items={items} />); const progressTrackerStages = wrapper.find(ProgressTrackerStage); testNoOrSingleStepRenderTransitions(progressTrackerStages); }); it('should set backwards transition', () => { const wrapper = shallow(<ProgressTracker items={completedStages} />); wrapper.setProps({ items }); const progressTrackerStages = wrapper.find(ProgressTrackerStage); testBackwardsRenderTransitions(progressTrackerStages); }); it('should set multistep transition', () => { const wrapper = shallow(<ProgressTracker items={items} />); wrapper.setProps({ items: completedStages }); const progressTrackerStages = wrapper.find(ProgressTrackerStage); testMultiStepRenderTransitions(progressTrackerStages); }); it('should set single step transitions', () => { const wrapper = shallow(<ProgressTracker items={items} />); const changedStages = items.map(stage => { if (stage.id === '1') { return { id: '1', label: 'Step 1', percentageComplete: 50, href: '#', status: 'current', }; } return stage; }); wrapper.setProps({ changedStages }); const progressTrackerStages = wrapper.find(ProgressTrackerStage); testNoOrSingleStepRenderTransitions(progressTrackerStages); }); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
() => { const wrapper = shallow(<ProgressTracker items={items} />); expect(wrapper.length).toBeGreaterThan(0); expect(wrapper.find(ProgressTrackerContainer)).toHaveLength(1); expect(wrapper.find(Grid)).toHaveLength(1); expect(wrapper.find(ThemeProvider)).toHaveLength(1); expect(wrapper.find(ProgressTrackerStage)).toHaveLength(6); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
() => { const wrapper = shallow(<ProgressTracker items={items} />); expect(wrapper.find(ThemeProvider).props().theme).toMatchObject({ spacing: 'cosy', columns: 12, }); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
() => { const wrapper = shallow(<ProgressTracker items={items} />); const progressTrackerStages = wrapper.find(ProgressTrackerStage); testNoOrSingleStepRenderTransitions(progressTrackerStages); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
() => { const wrapper = shallow(<ProgressTracker items={completedStages} />); wrapper.setProps({ items }); const progressTrackerStages = wrapper.find(ProgressTrackerStage); testBackwardsRenderTransitions(progressTrackerStages); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
() => { const wrapper = shallow(<ProgressTracker items={items} />); wrapper.setProps({ items: completedStages }); const progressTrackerStages = wrapper.find(ProgressTrackerStage); testMultiStepRenderTransitions(progressTrackerStages); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
() => { const wrapper = shallow(<ProgressTracker items={items} />); const changedStages = items.map(stage => { if (stage.id === '1') { return { id: '1', label: 'Step 1', percentageComplete: 50, href: '#', status: 'current', }; } return stage; }); wrapper.setProps({ changedStages }); const progressTrackerStages = wrapper.find(ProgressTrackerStage); testNoOrSingleStepRenderTransitions(progressTrackerStages); }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
ArrowFunction
stage => { if (stage.id === '1') { return { id: '1', label: 'Step 1', percentageComplete: 50, href: '#', status: 'current', }; } return stage; }
HereSinceres/atlaskit-mk-2
packages/core/progress-tracker/src/ProgressTracker/__tests__/unit/index.tsx
TypeScript
FunctionDeclaration
export function check(script: Buffer | Array<number | Buffer>): boolean { const buffer = bscript.compile(script); return ( buffer.length === 93 && buffer[1] === OPS.OP_IF && buffer[2] === OPS.OP_SHA256 && buffer[3] === 0x20 && buffer[36] === OPS.OP_EQUALVERIFY && buffer[37] === OPS.OP_DUP && buffer[38] === OPS.OP_HASH160 && buffer[39] === 0x14 && buffer[60] === OPS.OP_ELSE && buffer[61] === 0x3 && buffer[65] === OPS.OP_CHECKLOCKTIMEVERIFY && buffer[66] === OPS.OP_DROP && buffer[67] === OPS.OP_DUP && buffer[68] === OPS.OP_HASH160 && buffer[69] === 0x14 && buffer[90] === OPS.OP_ENDIF && buffer[91] === OPS.OP_EQUALVERIFY && buffer[92] === OPS.OP_CHECKSIG ); }
j-bitmaker/bitcoinjs-lib
ts_src/templates/htlc/output.ts
TypeScript
ArrowFunction
(): string => { return 'htlc output'; }
j-bitmaker/bitcoinjs-lib
ts_src/templates/htlc/output.ts
TypeScript
ClassDeclaration
@NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule], }) export class AppRoutingModule { }
DonaldTdz/AbpCoreBasic2
ng-admin/src/app/app-routing.module.ts
TypeScript
ClassDeclaration
export class LegacyTryCatchClauseProcessor extends LegacyNodeProcessor<TryCatchClause> { process( reader: ASTReader, config: ASTReaderConfiguration, raw: any ): ConstructorParameters<typeof TryCatchClause> { const [id, src, type] = super.process(reader, config, raw); const children = reader.convertArray(raw.children, config); const errorName: string = raw.attributes.errorName; const block = children.pop() as Block; const parameters = children.length ? (children.pop() as ParameterList) : undefined; return [id, src, type, errorName, block, parameters, raw]; } }
sambacha/solc-typed-ast
src/ast/legacy/try_catch_clause_processor.ts
TypeScript
MethodDeclaration
process( reader: ASTReader, config: ASTReaderConfiguration, raw: any ): ConstructorParameters<typeof TryCatchClause> { const [id, src, type] = super.process(reader, config, raw); const children = reader.convertArray(raw.children, config); const errorName: string = raw.attributes.errorName; const block = children.pop() as Block; const parameters = children.length ? (children.pop() as ParameterList) : undefined; return [id, src, type, errorName, block, parameters, raw]; }
sambacha/solc-typed-ast
src/ast/legacy/try_catch_clause_processor.ts
TypeScript