type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
MethodDeclaration
/** * Parse the folder from FolderCmekSettings resource. * * @param {string} folderCmekSettingsName * A fully-qualified path representing folder_cmekSettings resource. * @returns {string} A string representing the folder. */ matchFolderFromFolderCmekSettingsName(folderCmekSettingsName: string) { ...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified folderExclusion resource name string. * * @param {string} folder * @param {string} exclusion * @returns {string} Resource name string. */ folderExclusionPath(folder: string, exclusion: string) { return this.pathTemplates.folderExclusionPathTemplate.render({ fol...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the folder from FolderExclusion resource. * * @param {string} folderExclusionName * A fully-qualified path representing folder_exclusion resource. * @returns {string} A string representing the folder. */ matchFolderFromFolderExclusionName(folderExclusionName: string) { return this.pa...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the exclusion from FolderExclusion resource. * * @param {string} folderExclusionName * A fully-qualified path representing folder_exclusion resource. * @returns {string} A string representing the exclusion. */ matchExclusionFromFolderExclusionName(folderExclusionName: string) { retur...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified folderLocationBucket resource name string. * * @param {string} folder * @param {string} location * @param {string} bucket * @returns {string} Resource name string. */ folderLocationBucketPath(folder: string, location: string, bucket: string) { return this.pathTemp...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the folder from FolderLocationBucket resource. * * @param {string} folderLocationBucketName * A fully-qualified path representing folder_location_bucket resource. * @returns {string} A string representing the folder. */ matchFolderFromFolderLocationBucketName(folderLocationBucketName: st...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the location from FolderLocationBucket resource. * * @param {string} folderLocationBucketName * A fully-qualified path representing folder_location_bucket resource. * @returns {string} A string representing the location. */ matchLocationFromFolderLocationBucketName(folderLocationBucketNa...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the bucket from FolderLocationBucket resource. * * @param {string} folderLocationBucketName * A fully-qualified path representing folder_location_bucket resource. * @returns {string} A string representing the bucket. */ matchBucketFromFolderLocationBucketName(folderLocationBucketName: st...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified folderLog resource name string. * * @param {string} folder * @param {string} log * @returns {string} Resource name string. */ folderLogPath(folder: string, log: string) { return this.pathTemplates.folderLogPathTemplate.render({ folder: folder, log: log, ...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the folder from FolderLog resource. * * @param {string} folderLogName * A fully-qualified path representing folder_log resource. * @returns {string} A string representing the folder. */ matchFolderFromFolderLogName(folderLogName: string) { return this.pathTemplates.folderLogPathTempl...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the log from FolderLog resource. * * @param {string} folderLogName * A fully-qualified path representing folder_log resource. * @returns {string} A string representing the log. */ matchLogFromFolderLogName(folderLogName: string) { return this.pathTemplates.folderLogPathTemplate.match...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified folderSink resource name string. * * @param {string} folder * @param {string} sink * @returns {string} Resource name string. */ folderSinkPath(folder: string, sink: string) { return this.pathTemplates.folderSinkPathTemplate.render({ folder: folder, sink: ...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the folder from FolderSink resource. * * @param {string} folderSinkName * A fully-qualified path representing folder_sink resource. * @returns {string} A string representing the folder. */ matchFolderFromFolderSinkName(folderSinkName: string) { return this.pathTemplates.folderSinkPat...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the sink from FolderSink resource. * * @param {string} folderSinkName * A fully-qualified path representing folder_sink resource. * @returns {string} A string representing the sink. */ matchSinkFromFolderSinkName(folderSinkName: string) { return this.pathTemplates.folderSinkPathTempl...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified logMetric resource name string. * * @param {string} project * @param {string} metric * @returns {string} Resource name string. */ logMetricPath(project: string, metric: string) { return this.pathTemplates.logMetricPathTemplate.render({ project: project, m...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the project from LogMetric resource. * * @param {string} logMetricName * A fully-qualified path representing LogMetric resource. * @returns {string} A string representing the project. */ matchProjectFromLogMetricName(logMetricName: string) { return this.pathTemplates.logMetricPathTem...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the metric from LogMetric resource. * * @param {string} logMetricName * A fully-qualified path representing LogMetric resource. * @returns {string} A string representing the metric. */ matchMetricFromLogMetricName(logMetricName: string) { return this.pathTemplates.logMetricPathTempla...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified organizationCmekSettings resource name string. * * @param {string} organization * @returns {string} Resource name string. */ organizationCmekSettingsPath(organization: string) { return this.pathTemplates.organizationCmekSettingsPathTemplate.render({ organization: ...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the organization from OrganizationCmekSettings resource. * * @param {string} organizationCmekSettingsName * A fully-qualified path representing organization_cmekSettings resource. * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationCmekSettings...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified organizationExclusion resource name string. * * @param {string} organization * @param {string} exclusion * @returns {string} Resource name string. */ organizationExclusionPath(organization: string, exclusion: string) { return this.pathTemplates.organizationExclusionP...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the organization from OrganizationExclusion resource. * * @param {string} organizationExclusionName * A fully-qualified path representing organization_exclusion resource. * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationExclusionName( or...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the exclusion from OrganizationExclusion resource. * * @param {string} organizationExclusionName * A fully-qualified path representing organization_exclusion resource. * @returns {string} A string representing the exclusion. */ matchExclusionFromOrganizationExclusionName( organizatio...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified organizationLocationBucket resource name string. * * @param {string} organization * @param {string} location * @param {string} bucket * @returns {string} Resource name string. */ organizationLocationBucketPath( organization: string, location: string, bucke...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the organization from OrganizationLocationBucket resource. * * @param {string} organizationLocationBucketName * A fully-qualified path representing organization_location_bucket resource. * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLocat...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the location from OrganizationLocationBucket resource. * * @param {string} organizationLocationBucketName * A fully-qualified path representing organization_location_bucket resource. * @returns {string} A string representing the location. */ matchLocationFromOrganizationLocationBucketNam...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the bucket from OrganizationLocationBucket resource. * * @param {string} organizationLocationBucketName * A fully-qualified path representing organization_location_bucket resource. * @returns {string} A string representing the bucket. */ matchBucketFromOrganizationLocationBucketName( ...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified organizationLog resource name string. * * @param {string} organization * @param {string} log * @returns {string} Resource name string. */ organizationLogPath(organization: string, log: string) { return this.pathTemplates.organizationLogPathTemplate.render({ org...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the organization from OrganizationLog resource. * * @param {string} organizationLogName * A fully-qualified path representing organization_log resource. * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLogName(organizationLogName: string) { ...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the log from OrganizationLog resource. * * @param {string} organizationLogName * A fully-qualified path representing organization_log resource. * @returns {string} A string representing the log. */ matchLogFromOrganizationLogName(organizationLogName: string) { return this.pathTemplat...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified organizationSink resource name string. * * @param {string} organization * @param {string} sink * @returns {string} Resource name string. */ organizationSinkPath(organization: string, sink: string) { return this.pathTemplates.organizationSinkPathTemplate.render({ ...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the organization from OrganizationSink resource. * * @param {string} organizationSinkName * A fully-qualified path representing organization_sink resource. * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationSinkName(organizationSinkName: strin...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the sink from OrganizationSink resource. * * @param {string} organizationSinkName * A fully-qualified path representing organization_sink resource. * @returns {string} A string representing the sink. */ matchSinkFromOrganizationSinkName(organizationSinkName: string) { return this.pat...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified project resource name string. * * @param {string} project * @returns {string} Resource name string. */ projectPath(project: string) { return this.pathTemplates.projectPathTemplate.render({ project: project, }); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the project from Project resource. * * @param {string} projectName * A fully-qualified path representing Project resource. * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: string) { return this.pathTemplates.projectPathTemplate.match(...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified projectCmekSettings resource name string. * * @param {string} project * @returns {string} Resource name string. */ projectCmekSettingsPath(project: string) { return this.pathTemplates.projectCmekSettingsPathTemplate.render({ project: project, }); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the project from ProjectCmekSettings resource. * * @param {string} projectCmekSettingsName * A fully-qualified path representing project_cmekSettings resource. * @returns {string} A string representing the project. */ matchProjectFromProjectCmekSettingsName(projectCmekSettingsName: strin...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified projectExclusion resource name string. * * @param {string} project * @param {string} exclusion * @returns {string} Resource name string. */ projectExclusionPath(project: string, exclusion: string) { return this.pathTemplates.projectExclusionPathTemplate.render({ ...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the project from ProjectExclusion resource. * * @param {string} projectExclusionName * A fully-qualified path representing project_exclusion resource. * @returns {string} A string representing the project. */ matchProjectFromProjectExclusionName(projectExclusionName: string) { return...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the exclusion from ProjectExclusion resource. * * @param {string} projectExclusionName * A fully-qualified path representing project_exclusion resource. * @returns {string} A string representing the exclusion. */ matchExclusionFromProjectExclusionName(projectExclusionName: string) { ...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified projectLocationBucket resource name string. * * @param {string} project * @param {string} location * @param {string} bucket * @returns {string} Resource name string. */ projectLocationBucketPath(project: string, location: string, bucket: string) { return this.path...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the project from ProjectLocationBucket resource. * * @param {string} projectLocationBucketName * A fully-qualified path representing project_location_bucket resource. * @returns {string} A string representing the project. */ matchProjectFromProjectLocationBucketName(projectLocationBucket...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the location from ProjectLocationBucket resource. * * @param {string} projectLocationBucketName * A fully-qualified path representing project_location_bucket resource. * @returns {string} A string representing the location. */ matchLocationFromProjectLocationBucketName( projectLocati...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the bucket from ProjectLocationBucket resource. * * @param {string} projectLocationBucketName * A fully-qualified path representing project_location_bucket resource. * @returns {string} A string representing the bucket. */ matchBucketFromProjectLocationBucketName(projectLocationBucketNam...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified projectLog resource name string. * * @param {string} project * @param {string} log * @returns {string} Resource name string. */ projectLogPath(project: string, log: string) { return this.pathTemplates.projectLogPathTemplate.render({ project: project, log:...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the project from ProjectLog resource. * * @param {string} projectLogName * A fully-qualified path representing project_log resource. * @returns {string} A string representing the project. */ matchProjectFromProjectLogName(projectLogName: string) { return this.pathTemplates.projectLog...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the log from ProjectLog resource. * * @param {string} projectLogName * A fully-qualified path representing project_log resource. * @returns {string} A string representing the log. */ matchLogFromProjectLogName(projectLogName: string) { return this.pathTemplates.projectLogPathTemplate...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified projectSink resource name string. * * @param {string} project * @param {string} sink * @returns {string} Resource name string. */ projectSinkPath(project: string, sink: string) { return this.pathTemplates.projectSinkPathTemplate.render({ project: project, ...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the project from ProjectSink resource. * * @param {string} projectSinkName * A fully-qualified path representing project_sink resource. * @returns {string} A string representing the project. */ matchProjectFromProjectSinkName(projectSinkName: string) { return this.pathTemplates.proje...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the sink from ProjectSink resource. * * @param {string} projectSinkName * A fully-qualified path representing project_sink resource. * @returns {string} A string representing the sink. */ matchSinkFromProjectSinkName(projectSinkName: string) { return this.pathTemplates.projectSinkPat...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Terminate the gRPC channel and close the client. * * The client will no longer be usable and all future behavior is undefined. * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise<void> { this.initialize(); if (!this._terminated) { return this.me...
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
ArrowFunction
(b: boolean) => { if (b && !qs('#SP_PLUS_STICKERS')) { let s = ce('script', { type: 'text/javascript', id: 'SP_PLUS_STICKERS', innerHTML: 'var open=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(e,o,t){var n=open.apply(this,arguments);return-1==o.in...
spaces-dev/SpacesPlus
src/components/freeStickers.ts
TypeScript
ClassDeclaration
@Controller('tags') export class TagsController { constructor(private tagsService: TagsServices) {} @Get() async getTags(@Query() query: any): Promise<TagsDTO> { return await this.tagsService.getAll(query); } @Get(':tagId') async getTag(@Param('tagId') tagId: number): Promise<TagDTO> { return awa...
Buchiharu/mini_medium
smart.auth/src/features/tags/tags.controller.ts
TypeScript
MethodDeclaration
@Get() async getTags(@Query() query: any): Promise<TagsDTO> { return await this.tagsService.getAll(query); }
Buchiharu/mini_medium
smart.auth/src/features/tags/tags.controller.ts
TypeScript
MethodDeclaration
@Get(':tagId') async getTag(@Param('tagId') tagId: number): Promise<TagDTO> { return await this.tagsService.getOne(tagId); }
Buchiharu/mini_medium
smart.auth/src/features/tags/tags.controller.ts
TypeScript
MethodDeclaration
@UseGuards(JwtAuthGuard) @Post() async createTag( @User() user: UserDTO, @Body() tagData: TagDTO, ): Promise<TagDTO> { return await this.tagsService.create(user, tagData); }
Buchiharu/mini_medium
smart.auth/src/features/tags/tags.controller.ts
TypeScript
MethodDeclaration
@UseGuards(JwtAuthGuard) @Put(':tagId') async updateTag( @User() user: UserDTO, @Param('tagId') tagId: number, @Body() tagData: TagDTO, ): Promise<TagDTO> { return await this.tagsService.update(user, tagId, tagData); }
Buchiharu/mini_medium
smart.auth/src/features/tags/tags.controller.ts
TypeScript
MethodDeclaration
@UseGuards(JwtAuthGuard) @Delete(':tagId') async deleteTag( @User() user: UserDTO, @Param('tagId') tagId: number, ): Promise<TagDTO> { return await this.tagsService.delete(user, tagId); }
Buchiharu/mini_medium
smart.auth/src/features/tags/tags.controller.ts
TypeScript
ArrowFunction
() => { describe('constructor, size and values', () => { it('should create empty set if nothing passed in', () => { const set = new DeepSet(); expect(Array.from(set.values())).toEqual([]); expect(set.size).toEqual(0); }); it('should have a set with a number of values', () => { con...
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { it('should create empty set if nothing passed in', () => { const set = new DeepSet(); expect(Array.from(set.values())).toEqual([]); expect(set.size).toEqual(0); }); it('should have a set with a number of values', () => { const set = new DeepSet([1, 2]); expect(Array.fr...
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet(); expect(Array.from(set.values())).toEqual([]); expect(set.size).toEqual(0); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet([1, 2]); expect(Array.from(set.values())).toEqual([1, 2]); expect(set.size).toEqual(2); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet([{ a: 1 }, { a: 2 }, { a: 1 }]); expect(Array.from(set.values())).toEqual([{ a: 1 }, { a: 2 }]); expect(set.size).toEqual(2); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { it('should return the set', () => { const set = new DeepSet(); const returnValue = set.add(1); expect(returnValue).toBe(set); }); it('should add a value to the set', () => { const set = new DeepSet(); set.add(1); expect(Array.from(set.values())).toEqual([1]); ...
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet(); const returnValue = set.add(1); expect(returnValue).toBe(set); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet(); set.add(1); expect(Array.from(set.values())).toEqual([1]); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet(); set.add(1); set.add(1); expect(Array.from(set.values())).toEqual([1]); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { it('should return true if the object is in the set', () => { const set = new DeepSet(); set.add({ x: 1 }); expect(set.has({ x: 1 })).toEqual(true); }); it('should return false if the object is not in the set', () => { const set = new DeepSet(); set.add({ x: 1 }); ...
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet(); set.add({ x: 1 }); expect(set.has({ x: 1 })).toEqual(true); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet(); set.add({ x: 1 }); expect(set.has({ x: 2 })).toEqual(false); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { it('should delete the element', () => { const set = new DeepSet([{ x: 1 }]); set.delete({ x: 1 }); expect(set.has({ x: 1 })).toEqual(false); }); it('should return true when an item is deleted', () => { const set = new DeepSet([{ x: 1 }]); expect(set.delete({ x: 1 })).t...
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet([{ x: 1 }]); set.delete({ x: 1 }); expect(set.has({ x: 1 })).toEqual(false); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet([{ x: 1 }]); expect(set.delete({ x: 1 })).toEqual(true); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet([{ x: 1 }]); expect(set.delete({ x: 2 })).toEqual(false); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { it('should clear all items in the set', () => { const set = new DeepSet([{ x: 1 }, { x: 2 }]); set.clear(); expect(Array.from(set.values())).toEqual([]); expect(set.size).toEqual(0); }); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const set = new DeepSet([{ x: 1 }, { x: 2 }]); set.clear(); expect(Array.from(set.values())).toEqual([]); expect(set.size).toEqual(0); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { it('should run a callback on every item', () => { const fn = jest.fn(); const values = [1, 2]; const set = new DeepSet(values); set.forEach(fn); expect(fn).toHaveBeenCalledTimes(2); expect(fn).toHaveBeenCalledWith(1); expect(fn).toHaveBeenCalledWith(2); }); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
ArrowFunction
() => { const fn = jest.fn(); const values = [1, 2]; const set = new DeepSet(values); set.forEach(fn); expect(fn).toHaveBeenCalledTimes(2); expect(fn).toHaveBeenCalledWith(1); expect(fn).toHaveBeenCalledWith(2); }
qisaw/natural-selection-model
src/utils/deep-set.test.ts
TypeScript
FunctionDeclaration
export function NewRoom() { const { user } = useAuth() const history = useHistory() const [newRoom, setNewRoom] = useState('') async function handleCreateRoom(event: FormEvent) { event.preventDefault(); if(newRoom.trim() === '') { return } const roomRef = database.ref('rooms') co...
Arthur-Luna-Freire/NLW-Letmeask
NewRoom.tsx
TypeScript
FunctionDeclaration
async function handleCreateRoom(event: FormEvent) { event.preventDefault(); if(newRoom.trim() === '') { return } const roomRef = database.ref('rooms') const firebaseRoom = await roomRef.push({ title: newRoom, authorId: user?.id }) history.push(`/rooms/${firebaseRoom.ke...
Arthur-Luna-Freire/NLW-Letmeask
NewRoom.tsx
TypeScript
MethodDeclaration
setNewRoom(event
Arthur-Luna-Freire/NLW-Letmeask
NewRoom.tsx
TypeScript
ClassDeclaration
@Module({ imports: [ UsersModule, MongooseModule.forRoot( 'mongodb+srv://lobo:nhaca@cluster0.yydip.mongodb.net/test', ), ], controllers: [AppController], providers: [AppService], }) export class AppModule {}
andrelobo/nest-heroku
src/app.module.ts
TypeScript
ClassDeclaration
export declare class UserStorageServiceFilesystemImpl implements UserStorageService { protected readonly fileSystem: FileSystem; protected readonly watcher: FileSystemWatcher; protected readonly logger: ILogger; protected readonly toDispose: DisposableCollection; protected readonly onUserStorageCha...
amirsaad2015/dsl
node_modules/@theia/userstorage/lib/browser/user-storage-service-filesystem.d.ts
TypeScript
MethodDeclaration
onDidFilesChanged(fileChanges: FileChange[]): void;
amirsaad2015/dsl
node_modules/@theia/userstorage/lib/browser/user-storage-service-filesystem.d.ts
TypeScript
MethodDeclaration
readContents(uri: URI): Promise<string>;
amirsaad2015/dsl
node_modules/@theia/userstorage/lib/browser/user-storage-service-filesystem.d.ts
TypeScript
MethodDeclaration
saveContents(uri: URI, content: string): Promise<void>;
amirsaad2015/dsl
node_modules/@theia/userstorage/lib/browser/user-storage-service-filesystem.d.ts
TypeScript
MethodDeclaration
/** * Creates a new user storage URI from the filesystem URI. * @param userStorageFolderUri User storage folder URI * @param fsPath The filesystem URI */ static toUserStorageUri(userStorageFolderUri: URI, rawUri: URI): URI;
amirsaad2015/dsl
node_modules/@theia/userstorage/lib/browser/user-storage-service-filesystem.d.ts
TypeScript
MethodDeclaration
/** * Returns the path relative to the user storage filesystem uri i.e if the user storage root is * 'file://home/user/.theia' and the fileUri is 'file://home/user.theia/keymaps.json' it will return 'keymaps.json' * @param userStorageFolderUri User storage folder URI * @param fileUri User storage ...
amirsaad2015/dsl
node_modules/@theia/userstorage/lib/browser/user-storage-service-filesystem.d.ts
TypeScript
MethodDeclaration
/** * Returns the associated filesystem URI relative to the user storage folder passed as argument. * @param userStorageFolderUri User storage folder URI * @param userStorageUri User storage URI to be converted in filesystem URI */ static toFilesystemURI(userStorageFolderUri: URI, userStorageUri: UR...
amirsaad2015/dsl
node_modules/@theia/userstorage/lib/browser/user-storage-service-filesystem.d.ts
TypeScript
ClassDeclaration
@Controller('users') export class UsersController { constructor( private readonly configService: ConfigService, private readonly usersService: UsersService, ) {} @Get() @UseGuards(JwtAuthGuard) async getAll() { return await this.usersService.getAllUsers(); } }
joeczar/nestjs-typeorm-pg_docker-boilerplate
src/users/users.controller.ts
TypeScript
MethodDeclaration
@Get() @UseGuards(JwtAuthGuard) async getAll() { return await this.usersService.getAllUsers(); }
joeczar/nestjs-typeorm-pg_docker-boilerplate
src/users/users.controller.ts
TypeScript
ArrowFunction
() => { expect(Hello('someone')).toBe('Hello someone'); }
mohsaeeed/helenjs
src/__tests__/Greeting.test.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-car-detail', templateUrl: './car-detail.component.html', styleUrls: ['./car-detail.component.scss'] }) export class CarDetailComponent implements OnInit { constructor() { } ngOnInit() { } }
rajraja/bond-evalue
src/app/layout/cars/component/car-detail/car-detail.component.ts
TypeScript
FunctionDeclaration
function handler(req: NextApiRequest, res: NextApiResponse) { if (req.method === 'POST') return handlePost(req, res); res.status(404).end(); }
alyssapiresfernandescefet/openrpg
src/pages/api/sheet/player/annotation.ts
TypeScript
FunctionDeclaration
async function handlePost(req: NextApiRequest, res: NextApiResponse) { const player = req.session.player; if (!player) { res.status(401).end(); return; } const value = req.body.value; if (value === undefined) { res.status(400).send({ message: 'value is undefined.' }); return; } await database.player...
alyssapiresfernandescefet/openrpg
src/pages/api/sheet/player/annotation.ts
TypeScript
MethodDeclaration
async execute(interaction: CommandInteraction, guildId: string) { if (!(interaction.member instanceof GuildMember)) return; if (!interaction.member.voice.channel) { interaction.reply('you have to be in a voice channel to use this command!') return; } if (queueMap...
Benedek03/BubukaMusic
src/cmds/disconnect.ts
TypeScript
FunctionDeclaration
export function Fingerprint() { return ( <Svg testID="FingerprintBiometryIcon" width={64} height={64} fill="none"> <Path d="M47.493 11.92c-.213 0-.426-.053-.613-.16C41.76 9.12 37.333 8 32.027 8c-5.28 0-10.294 1.253-14.854 3.76-.64.347-1.44.107-1.813-.533a1.35 1.35 0 0 1 .534-1.814c4.96-2.693 10.4-4...
nicolasbrugneaux/wallet
packages/mobile/src/icons/biometry/Fingerprint.tsx
TypeScript
FunctionDeclaration
function validOneTimeAuthCodeValue(value) { // TODO: verify/improve if (value.match(/^[0-9_]{6}/i)) { return value.toLowerCase() } return new Error("Invalid value for OneTimeAuthCode") }
twshelton/galoy
src/graphql/types/scalar/one-time-auth-code.ts
TypeScript
MethodDeclaration
parseValue(value) { return validOneTimeAuthCodeValue(value) }
twshelton/galoy
src/graphql/types/scalar/one-time-auth-code.ts
TypeScript
MethodDeclaration
parseLiteral(ast) { if (ast.kind === GT.Kind.STRING) { return validOneTimeAuthCodeValue(ast.value) } return new Error("Invalid type for OneTimeAuthCode") }
twshelton/galoy
src/graphql/types/scalar/one-time-auth-code.ts
TypeScript
ClassDeclaration
/** * // @dynamic */ @NgModule({ imports: [CommonModule], declarations: [...F2Component], exports: [...F2Component], }) export class F2Module { // static forRoot(config?: F2Config): ModuleWithProviders { // return { // ngModule: F2Module, // providers: [ // { // provide: Con...
CK110/ngx-antv-f2
projects/ngx-antv-f2/src/lib/basic/f2.module.ts
TypeScript