type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
field => field instanceof SimpleField
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
user => user.email.startsWith('alice')
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
user => user.email.startsWith('grace')
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
item => item.order.user.email.startsWith('grace')
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
row => row.name === 'Apple'
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
row => row.name === 'Banana'
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
async done => { const db = helper.connectToDatabase(NAME); const { User, Post } = db.getModels(); const user = new User({ email: 'user@example.com' }); const post = new Post({ title: 'My first post', user }); user.firstPost = post; await user.save(); const posts = await db.table('post').select('*',...
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
async done => { const db = helper.connectToDatabase(NAME); const title = 'Example Post #1'; db.table('post').append({ title }); await db.flush(); const posts = await db.table('post').select('*', { where: { title } }); expect(posts.length).toBe(1); done(); }
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
async done => { const db = helper.connectToDatabase(NAME); const title = 'Example Post #2'; const content = 'Example Comment #'; const post = db.table('post').append({ title }); const comment = db.table('comment').append({ post, content }); const comment1 = db .table('comment') .append({ post, con...
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
entry => entry.content === content + '1'
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
entry => entry.parent && entry.parent.id === commentId
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
async done => { const db = helper.connectToDatabase(NAME); const post = db.table('post').append({ title: '#3' }); db.table('comment').append({ post, content: '#3.1' }); db.table('comment').append({ post: null, content: '#.2' }); await db.flush(); const rows = await db.table('comment').select( { ...
ailytic/sql
test/example.test.ts
TypeScript
ArrowFunction
row => row.post === null
ailytic/sql
test/example.test.ts
TypeScript
FunctionDeclaration
function htmllink( title: string, text?: string ) { return `<a href="https://zh.wikipedia.org/wiki/${ encodeURI( title ) }">${ text || title }</a>`; }
Emojigit/ICG-BOT
src/modules/afc/events/helpdesk.ts
TypeScript
FunctionDeclaration
function mdlink( title: string, text?: string ) { return `[${ text || title }](https://zh.wikipedia.org/wiki/${ encodeURI( title ) })`; }
Emojigit/ICG-BOT
src/modules/afc/events/helpdesk.ts
TypeScript
ArrowFunction
( _i, ele ) => { diffText += $( ele ).text() + '\n'; }
Emojigit/ICG-BOT
src/modules/afc/events/helpdesk.ts
TypeScript
ArrowFunction
() => { if (this.state.opened) { this.handleHideFilters(); } else { this.handleShowFilters(); } }
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
ArrowFunction
() => { this.setState({ opened: true, }); this.props.onShow!(); }
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
ArrowFunction
() => { this.setState({ opened: false, }); this.props.onHide!(); }
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
ArrowFunction
() => { this.props.onApply!(); this.handleHideFilters(); }
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
ArrowFunction
() => { this.props.onClear!(); if (!this.props.keepOpenOnClear) { this.handleHideFilters(); } }
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
ArrowFunction
(event: MouseEvent) => { if (this.props.ignoreClickOutside) { return; } // Let the button handle itself const { current } = this.ref; if (current && current.contains(event.target as any)) { return; } this.handleHideFilters(); }
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
ArrowFunction
({ unit, transition }) => ({ container: { display: 'inline-block', position: 'relative', }, form: { ...transition.fade, visibility: 'visible', position: 'relative', }, form_hidden: { opacity: 0, visibility: 'hidden', userSelect: 'none', }, menu: { marginTop: unit, ...
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
ClassDeclaration
/** A button that opens a dropdown that shows filter options for a table or similar component. */ export class FilterMenu extends React.Component<Props & WithStylesProps, State> { static defaultProps = { children: null, ignoreClickOutside: false, large: false, onApply() {}, onClear() {}, onHid...
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
TypeAliasDeclaration
export type Props = { /** Accessibility label. */ accessibilityLabel: string; /** Number of currently active filters. */ activeCount?: number; /** Form components to be shown on the expanded view. */ children?: React.ReactNode; /** Props to pass to the `Dropdown` component. */ dropdownProps?: Partial<D...
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
TypeAliasDeclaration
export type State = { opened: Boolean; };
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
MethodDeclaration
onApply() {}
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
MethodDeclaration
onClear() {}
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
MethodDeclaration
onHide() {}
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
MethodDeclaration
onShow() {}
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
MethodDeclaration
render() { const { cx, accessibilityLabel, activeCount, children, dropdownProps = { right: 0 }, large, menuProps, small, styles, zIndex, } = this.props; const { opened } = this.state; const activeCountLabel = activeCount && activeCount >...
zezhouliu/lunar
packages/forms/src/components/FilterMenu/index.tsx
TypeScript
ArrowFunction
props => ( <Box width="100%"
Light-Labs/stacks-wallet-web
src/components/divider.tsx
TypeScript
MethodDeclaration
color('border')
Light-Labs/stacks-wallet-web
src/components/divider.tsx
TypeScript
ArrowFunction
async (): Promise<INote[]> => { const notes: INote[] = []; const ref = firebase.database().ref("notes"); const snapshot = await ref.once("value"); const value = snapshot.val(); if (!value) { return; } Object.keys(value).forEach((key) => { const content = value[key]["TEST"]; notes.push({ ...
Tif-P-HK/uni-notes
react/actions.ts
TypeScript
ArrowFunction
(key) => { const content = value[key]["TEST"]; notes.push({ key, description: content, }); }
Tif-P-HK/uni-notes
react/actions.ts
TypeScript
InterfaceDeclaration
export interface INote { key: string; description: string; }
Tif-P-HK/uni-notes
react/actions.ts
TypeScript
ArrowFunction
() => { var _component: string = "Test"; var _name: string = "Forward"; var _references: ProcessMockReferences = new ProcessMockReferences([]); var _queue: IMessageQueue; var _parameters: Parameters = new Parameters(); var _messageGenerator: MockMessageGenerator; var _sent: boolean = false...
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(done) => { _queue = <IMessageQueue>{ getName(): string { return 'MockQueue'; }, send(correlationId: string, envelope: MessageEnvelope, callback?: (err: any) => void): void { _sent = true; callback(null); }, ...
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(done) => { if (_messageGenerator != null) _messageGenerator.close(null, done); else done(); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(done) => { var badFn = function () { _messageGenerator = new MockMessageGenerator(null, _name, _queue, _references, _parameters); }; expect(badFn).to.throw('Component cannot be null'); done(); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(done) => { var badFn = function () { _messageGenerator = new MockMessageGenerator(_component, _name, null, _references, _parameters); }; expect(badFn).to.throw('Queue cannot be null'); done(); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(done) => { var badFn = function () { _messageGenerator = new MockMessageGenerator(_component, _name, _queue, null, _parameters); }; expect(badFn).to.throw('References cannot be null'); done(); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(done) => { _messageGenerator = new MockMessageGenerator(_component, _name, _queue, _references, _parameters); assert.isNotNull(_messageGenerator); done(); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(done) => { _sent = false; async.series([ (callback) => { _messageGenerator.sendMessage(new MessageEnvelope(null, null, null), (err) => { assert.isNull(err); assert.isTrue(_sent); callback(err); });...
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(callback) => { _messageGenerator.sendMessage(new MessageEnvelope(null, null, null), (err) => { assert.isNull(err); assert.isTrue(_sent); callback(err); }); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(err) => { assert.isNull(err); assert.isTrue(_sent); callback(err); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(callback) => { _sent = false; _messageGenerator.sendMessageAsObject(null, "messageType", "message Content", (err) => { assert.isNull(err); assert.isTrue(_sent); callback(err); }); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(callback) => { _sent = false; _messageGenerator.sendMessageAsObject(null, "messageType", new Object(), (err) => { assert.isNull(err); assert.isTrue(_sent); callback(err); }); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(done) => { _messageGenerator = new MockMessageGenerator(_component, _name, _queue, _references, _parameters); assert.equal(_messageGenerator.executionNumber, 0); _messageGenerator.beginExecute(); async.series([ (callback) => { setTimeout(callback, 100); ...
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(callback) => { setTimeout(callback, 100); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(callback) => { assert.equal(_messageGenerator.executionNumber, 1); _messageGenerator.beginExecute(); callback(); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
(callback) => { setTimeout(() => { assert.equal(_messageGenerator.executionNumber, 1); callback(); }, 100); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
ArrowFunction
() => { assert.equal(_messageGenerator.executionNumber, 1); callback(); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
MethodDeclaration
getName(): string { return 'MockQueue'; }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
MethodDeclaration
send(correlationId: string, envelope: MessageEnvelope, callback?: (err: any) => void): void { _sent = true; callback(null); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
MethodDeclaration
close(correlationId: string, callback?: (err: any) => void): void { if (callback) callback(null); }
pip-services-integration/pip-libs-processes-node
test/generators/MessageGenerator.test.ts
TypeScript
FunctionDeclaration
export function executeActions(multiIndex: MultiIndex, actions: Action[], rows: any[], changes: Changes, capture = false) { if(capture) { changes.capture(); } for(let row of rows) { for(let action of actions) { action.execute(multiIndex, row, changes); } } if(capture) { return changes.c...
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
ClassDeclaration
//--------------------------------------------------------------------- // Actions //--------------------------------------------------------------------- export abstract class Action { id: string; e: any; a: any; v: any; node: string; vars: Variable[]; resolved: any[]; scopes: string[]; constructor(i...
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
ClassDeclaration
export class InsertAction extends Action { execute(multiIndex, row, changes) { let [e,a,v] = this.resolve(row); for(let scope of this.scopes) { changes.store(scope,e,a,v,this.node); } } }
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
ClassDeclaration
export class RemoveAction extends Action { execute(multiIndex, row, changes) { let [e,a,v] = this.resolve(row); for(let scope of this.scopes) { changes.unstore(scope,e,a,v); } } }
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
ClassDeclaration
export class RemoveSupportAction extends Action { execute(multiIndex, row, changes) { let [e,a,v] = this.resolve(row); // console.log("removing support for", e,a,v, this.node); for(let scope of this.scopes) { changes.unstore(scope,e,a,v,this.node); } } }
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
ClassDeclaration
export class EraseAction extends Action { removeVs(index, changes, scope, e, a) { let keys = Object.keys(index); for(let key of keys) { let value = index[key].value; changes.unstore(scope,e,a,value); } } execute(multiIndex, row, changes) { let [e,a] = this.resolve(row); // multidb...
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
ClassDeclaration
export class SetAction extends Action { execute(multiIndex, row, changes) { let [e,a,v] = this.resolve(row); // multidb for(let scope of this.scopes) { let curIndex = multiIndex.getIndex(scope); let vIndex = curIndex.lookup(e,a,undefined); if(vIndex !== undefined) { let keys = O...
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
MethodDeclaration
// Return an array of the current values for all the registers resolve(prefix) { let resolved = this.resolved; resolved[0] = toValue(this.e, prefix); resolved[1] = toValue(this.a, prefix); resolved[2] = toValue(this.v, prefix); return resolved; }
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
MethodDeclaration
abstract execute(multiIndex: MultiIndex, row: any, changes: Changes);
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
MethodDeclaration
execute(multiIndex, row, changes) { let [e,a,v] = this.resolve(row); for(let scope of this.scopes) { changes.store(scope,e,a,v,this.node); } }
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
MethodDeclaration
execute(multiIndex, row, changes) { let [e,a,v] = this.resolve(row); for(let scope of this.scopes) { changes.unstore(scope,e,a,v); } }
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
MethodDeclaration
execute(multiIndex, row, changes) { let [e,a,v] = this.resolve(row); // console.log("removing support for", e,a,v, this.node); for(let scope of this.scopes) { changes.unstore(scope,e,a,v,this.node); } }
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
MethodDeclaration
removeVs(index, changes, scope, e, a) { let keys = Object.keys(index); for(let key of keys) { let value = index[key].value; changes.unstore(scope,e,a,value); } }
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
MethodDeclaration
execute(multiIndex, row, changes) { let [e,a] = this.resolve(row); // multidb for(let scope of this.scopes) { let avIndex = multiIndex.getIndex(scope).lookup(e,undefined,undefined); if(avIndex !== undefined) { if(a !== undefined) { let level = avIndex.index[a]; if(le...
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
MethodDeclaration
execute(multiIndex, row, changes) { let [e,a,v] = this.resolve(row); // multidb for(let scope of this.scopes) { let curIndex = multiIndex.getIndex(scope); let vIndex = curIndex.lookup(e,a,undefined); if(vIndex !== undefined) { let keys = Object.keys(vIndex.index); for(let ...
jonbjornn/eve-hyperdev
src/runtime/actions.ts
TypeScript
ArrowFunction
() => { return this.getNotebooksByWorkspacePagingPage(options); }
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
ArrowFunction
() => { return this.getNotebookSummaryByWorkSpacePagingPage(options); }
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
ArrowFunction
async ( args: coreHttp.OperationArguments, spec: coreHttp.OperationSpec ) => { try { const result = await this.client.sendOperationRequest(args, spec); return result as NotebookCreateOrUpdateNotebookResponse; } catch (error) { span.setStatus({ code: Canonic...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
ArrowFunction
async ( args: coreHttp.OperationArguments, spec: coreHttp.OperationSpec ) => { try { const result = await this.client.sendOperationRequest(args, spec); return result as coreHttp.RestResponse; } catch (error) { span.setStatus({ code: CanonicalCode.UNKNOWN, ...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
/** * Lists Notebooks. * @param options The options parameters. */ public listNotebooksByWorkspace( options?: coreHttp.OperationOptions ): PagedAsyncIterableIterator<NotebookResource> { const iter = this.getNotebooksByWorkspacePagingAll(options); return { next() { return iter.next()...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
private async *getNotebooksByWorkspacePagingPage( options?: coreHttp.OperationOptions ): AsyncIterableIterator<NotebookResource[]> { let result = await this._getNotebooksByWorkspace(options); yield result.value || []; let continuationToken = result.nextLink; while (continuationToken) { resu...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
private async *getNotebooksByWorkspacePagingAll( options?: coreHttp.OperationOptions ): AsyncIterableIterator<NotebookResource> { for await (const page of this.getNotebooksByWorkspacePagingPage(options)) { yield* page; } }
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
/** * Lists a summary of Notebooks. * @param options The options parameters. */ public listNotebookSummaryByWorkSpace( options?: coreHttp.OperationOptions ): PagedAsyncIterableIterator<NotebookResource> { const iter = this.getNotebookSummaryByWorkSpacePagingAll(options); return { next() { ...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
private async *getNotebookSummaryByWorkSpacePagingPage( options?: coreHttp.OperationOptions ): AsyncIterableIterator<NotebookResource[]> { let result = await this._getNotebookSummaryByWorkSpace(options); yield result.value || []; let continuationToken = result.nextLink; while (continuationToken) ...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
private async *getNotebookSummaryByWorkSpacePagingAll( options?: coreHttp.OperationOptions ): AsyncIterableIterator<NotebookResource> { for await (const page of this.getNotebookSummaryByWorkSpacePagingPage(options)) { yield* page; } }
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
/** * Lists Notebooks. * @param options The options parameters. */ private async _getNotebooksByWorkspace( options?: coreHttp.OperationOptions ): Promise<NotebookGetNotebooksByWorkspaceResponse> { const { span, updatedOptions } = createSpan( "ArtifactsClient-_getNotebooksByWorkspace", opt...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
/** * Lists a summary of Notebooks. * @param options The options parameters. */ private async _getNotebookSummaryByWorkSpace( options?: coreHttp.OperationOptions ): Promise<NotebookGetNotebookSummaryByWorkSpaceResponse> { const { span, updatedOptions } = createSpan( "ArtifactsClient-_getNoteboo...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
/** * Creates or updates a Note Book. * @param notebookName The notebook name. * @param notebook Note book resource definition. * @param options The options parameters. */ async createOrUpdateNotebook( notebookName: string, notebook: NotebookResource, options?: NotebookCreateOrUpdateNotebookO...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
/** * Gets a Note Book. * @param notebookName The notebook name. * @param options The options parameters. */ async getNotebook( notebookName: string, options?: NotebookGetNotebookOptionalParams ): Promise<NotebookGetNotebookResponse> { const { span, updatedOptions } = createSpan("ArtifactsClie...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
/** * Deletes a Note book. * @param notebookName The notebook name. * @param options The options parameters. */ async deleteNotebook( notebookName: string, options?: coreHttp.OperationOptions ): Promise<LROPoller<coreHttp.RestResponse>> { const { span, updatedOptions } = createSpan("ArtifactsC...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
/** * Renames a notebook. * @param notebookName The notebook name. * @param request proposed new name. * @param options The options parameters. */ async renameNotebook( notebookName: string, request: ArtifactRenameRequest, options?: coreHttp.OperationOptions ): Promise<LROPoller<coreHttp.Re...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
/** * GetNotebooksByWorkspaceNext * @param nextLink The nextLink from the previous successful call to the GetNotebooksByWorkspace * method. * @param options The options parameters. */ private async _getNotebooksByWorkspaceNext( nextLink: string, options?: coreHttp.OperationOptions...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
/** * GetNotebookSummaryByWorkSpaceNext * @param nextLink The nextLink from the previous successful call to the GetNotebookSummaryByWorkSpace * method. * @param options The options parameters. */ private async _getNotebookSummaryByWorkSpaceNext( nextLink: string, options?: coreHtt...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
MethodDeclaration
private getOperationOptions<TOptions extends coreHttp.OperationOptions>( options: TOptions | undefined, finalStateVia?: string ): coreHttp.RequestOptionsBase { const operationOptions: coreHttp.OperationOptions = options || {}; operationOptions.requestOptions = { ...operationOptions.requestOptio...
ConnectionMaster/azure-sdk-for-js
sdk/synapse/synapse-artifacts/src/operations/notebook.ts
TypeScript
ArrowFunction
() => { beforeEach(() => { fakeUsersRepository = new FakeUsersRepository() fakeUserTokensRepository = new FakeUserTokensRepository() fakeHashProvider = new FakeHashProvider() resetPasswordService = new ResetPasswordService( fakeUsersRepository, fakeUserTokensRepository, fakeHashProvider ) }) it...
Victor-Fiamoncini/go_barber
server/src/modules/users/services/ResetPasswordService.spec.ts
TypeScript
ArrowFunction
() => { fakeUsersRepository = new FakeUsersRepository() fakeUserTokensRepository = new FakeUserTokensRepository() fakeHashProvider = new FakeHashProvider() resetPasswordService = new ResetPasswordService( fakeUsersRepository, fakeUserTokensRepository, fakeHashProvider ) }
Victor-Fiamoncini/go_barber
server/src/modules/users/services/ResetPasswordService.spec.ts
TypeScript
ArrowFunction
async () => { const user = await fakeUsersRepository.create({ name: 'John Doe', email: 'johndoe@mail.com', password: '123456', }) const { token } = await fakeUserTokensRepository.generate(user.id) const generateHash = jest.spyOn(fakeHashProvider, 'generateHash') await resetPasswordService.execute...
Victor-Fiamoncini/go_barber
server/src/modules/users/services/ResetPasswordService.spec.ts
TypeScript
ArrowFunction
async () => { await expect( resetPasswordService.execute({ token: 'non-existing-token', password: '123456', }) ).rejects.toBeInstanceOf(AppError) }
Victor-Fiamoncini/go_barber
server/src/modules/users/services/ResetPasswordService.spec.ts
TypeScript
ArrowFunction
async () => { const { token } = await fakeUserTokensRepository.generate( 'non-existing-user' ) await expect( resetPasswordService.execute({ token, password: '123456', }) ).rejects.toBeInstanceOf(AppError) }
Victor-Fiamoncini/go_barber
server/src/modules/users/services/ResetPasswordService.spec.ts
TypeScript
ArrowFunction
async () => { const user = await fakeUsersRepository.create({ name: 'John Doe', email: 'johndoe@mail.com', password: '123456', }) const { token } = await fakeUserTokensRepository.generate(user.id) jest.spyOn(Date, 'now').mockImplementationOnce(() => { const now = new Date() return now.setHour...
Victor-Fiamoncini/go_barber
server/src/modules/users/services/ResetPasswordService.spec.ts
TypeScript
ArrowFunction
() => { const now = new Date() return now.setHours(now.getHours() + 3) }
Victor-Fiamoncini/go_barber
server/src/modules/users/services/ResetPasswordService.spec.ts
TypeScript
ArrowFunction
({ data, compact }) => !compact ? ( <ReactJson src={data}
nickysemenza/food
ui/src/components/Debug.tsx
TypeScript
ClassDeclaration
export class GeneratorFuelsComponent implements IComponentOptions { public template: string = require('@templates/Components/generatorFuels.html'); public controller = GeneratorFuelsComponentController; public controllerAs = 'ctrl'; public bindings = { building: '=', }; }
IanKemp/SatisfactoryTools
src/Module/Components/GeneratorFuelsComponent.ts
TypeScript
ArrowFunction
() => [ConfigurationDescriptionCreateWithoutConfigurationSetDescriptionInput]
e-NABLE-Volunteer-Community/configurator-export
src/@generated/prisma-nestjs-graphql/configuration-description/configuration-description-unchecked-create-nested-many-without-configuration-set-description.input.ts
TypeScript