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) { return this.pathTemplates.folderCmekSettingsPathTemplate.match( folderCmekSettingsName ).folder; }
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({ folder: folder, exclusion: exclusion, }); }
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.pathTemplates.folderExclusionPathTemplate.match( folderExclusionName ).folder; }
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) { return this.pathTemplates.folderExclusionPathTemplate.match( folderExclusionName ).exclusion; }
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.pathTemplates.folderLocationBucketPathTemplate.render({ folder: folder, location: location, bucket: bucket, }); }
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: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).folder; }
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(folderLocationBucketName: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).location; }
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: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).bucket; }
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.folderLogPathTemplate.match(folderLogName).folder; }
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(folderLogName).log; }
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: 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.folderSinkPathTemplate.match(folderSinkName) .folder; }
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.folderSinkPathTemplate.match(folderSinkName).sink; }
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, metric: metric, }); }
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.logMetricPathTemplate.match(logMetricName) .project; }
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.logMetricPathTemplate.match(logMetricName).metric; }
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: 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. */ matchOrganizationFromOrganizationCmekSettingsName( organizationCmekSettingsName: string ) { return this.pathTemplates.organizationCmekSettingsPathTemplate.match( organizationCmekSettingsName ).organization; }
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.organizationExclusionPathTemplate.render({ organization: organization, exclusion: exclusion, }); }
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( organizationExclusionName: string ) { return this.pathTemplates.organizationExclusionPathTemplate.match( organizationExclusionName ).organization; }
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( organizationExclusionName: string ) { return this.pathTemplates.organizationExclusionPathTemplate.match( organizationExclusionName ).exclusion; }
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, bucket: string ) { return this.pathTemplates.organizationLocationBucketPathTemplate.render({ organization: organization, location: location, bucket: bucket, }); }
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. */ matchOrganizationFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).organization; }
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. */ matchLocationFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).location; }
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( organizationLocationBucketName: string ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).bucket; }
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({ organization: organization, log: log, }); }
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) { return this.pathTemplates.organizationLogPathTemplate.match( organizationLogName ).organization; }
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.pathTemplates.organizationLogPathTemplate.match( organizationLogName ).log; }
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({ organization: organization, sink: sink, }); }
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: string) { return this.pathTemplates.organizationSinkPathTemplate.match( organizationSinkName ).organization; }
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.pathTemplates.organizationSinkPathTemplate.match( organizationSinkName ).sink; }
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(projectName).project; }
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: string) { return this.pathTemplates.projectCmekSettingsPathTemplate.match( projectCmekSettingsName ).project; }
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({ project: project, exclusion: exclusion, }); }
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 this.pathTemplates.projectExclusionPathTemplate.match( projectExclusionName ).project; }
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) { return this.pathTemplates.projectExclusionPathTemplate.match( projectExclusionName ).exclusion; }
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.pathTemplates.projectLocationBucketPathTemplate.render({ project: project, location: location, bucket: bucket, }); }
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(projectLocationBucketName: string) { return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).project; }
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( projectLocationBucketName: string ) { return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).location; }
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(projectLocationBucketName: string) { return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).bucket; }
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: 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.projectLogPathTemplate.match(projectLogName) .project; }
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.match(projectLogName).log; }
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, sink: sink, }); }
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.projectSinkPathTemplate.match(projectSinkName) .project; }
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.projectSinkPathTemplate.match(projectSinkName) .sink; }
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.metricsServiceV2Stub!.then(stub => { this._terminated = true; stub.close(); }); } return Promise.resolve(); }
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.indexOf("mail/sendMessage")&&-1==o.indexOf("diary/new")&&-1==o.indexOf("comments/add")||this.setRequestHeader("X-Proxy","spaces"),n};' }) document.getElementsByTagName('head')[0].appendChild(s) } }
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 await this.tagsService.getOne(tagId); } @UseGuards(JwtAuthGuard) @Post() async createTag( @User() user: UserDTO, @Body() tagData: TagDTO, ): Promise<TagDTO> { return await this.tagsService.create(user, tagData); } @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); } @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
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', () => { const set = new DeepSet([1, 2]); expect(Array.from(set.values())).toEqual([1, 2]); expect(set.size).toEqual(2); }); it('should remove duplicates', () => { 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); }); }); describe('add', () => { 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]); }); it('should only add an item once', () => { const set = new DeepSet(); set.add(1); set.add(1); expect(Array.from(set.values())).toEqual([1]); }); }); describe('has', () => { 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 }); expect(set.has({ x: 2 })).toEqual(false); }); }); describe('delete', () => { 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 })).toEqual(true); }); it('should return false if no item is deleted', () => { const set = new DeepSet([{ x: 1 }]); expect(set.delete({ x: 2 })).toEqual(false); }); }); describe('clear', () => { 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); }); }); describe('forEach', () => { 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
() => { 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.from(set.values())).toEqual([1, 2]); expect(set.size).toEqual(2); }); it('should remove duplicates', () => { 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
() => { 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]); }); it('should only add an item once', () => { 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
() => { 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 }); expect(set.has({ x: 2 })).toEqual(false); }); }
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 })).toEqual(true); }); it('should return false if no item is deleted', () => { 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
() => { 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') const firebaseRoom = await roomRef.push({ title: newRoom, authorId: user?.id }) history.push(`/rooms/${firebaseRoom.key}`); } return ( <div id="page-auth"> <aside> <img src={illustrationImg} alt="Ilustração simbolizando perguntas e respostas" /> <strong>Crie salas de Q&amp;A ao-vivo</strong> <p> Tire as dúvidas da sua audiência em tempo-real </p> </aside> <main> <div className="main-content"> <img src={logoImg} alt="Letmeask" /> <h2>Criar uma nova sala</h2> <form onSubmit={handleCreateRoom}> <input type="text" placeholder="Nome da sala" onChange={event => setNewRoom(event.target.value)} value={newRoom} /> <Button type="submit"> Criar sala </Button> </form> <p> Quer entrar em uma sala existente? <Link to="/">clique aqui</Link> </p> </div> </main> </div> ) }
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.key}`); }
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:[email protected]/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 onUserStorageChangedEmitter: Emitter<UserStorageChangeEvent>; protected readonly userStorageFolder: Promise<URI>; constructor(fileSystem: FileSystem, watcher: FileSystemWatcher, logger: ILogger); dispose(): void; onDidFilesChanged(fileChanges: FileChange[]): void; readContents(uri: URI): Promise<string>; saveContents(uri: URI, content: string): Promise<void>; readonly onUserStorageChanged: Event<UserStorageChangeEvent>; /** * 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; /** * 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 */ private static getRelativeUserStoragePath(userStorageFolderUri, fileUri); /** * 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: URI): URI; }
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 */ private static getRelativeUserStoragePath(userStorageFolderUri, fileUri);
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: URI): URI;
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.playerNote.update({ data: { value }, where: { player_id: player.id }, }); res.end(); }
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.has(guildId) && interaction.member.voice.channelId !=queueMap.get(guildId)?.channelId) { interaction.reply('you have to be in the same voice channel with me to use this command!') return; } if (!queueMap.has(guildId)) { interaction.reply('there is no queue in this guild'); return; } let q = queueMap.get(guildId) as Queue; q.leave(); interaction.reply('disconnected') }
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.08 16.133-4.08 5.68 0 10.64 1.254 16.08 4.054.666.346.907 1.146.56 1.786-.24.48-.694.747-1.174.747Zm-38.16 14a1.33 1.33 0 0 1-1.093-2.107c2.64-3.733 6-6.666 10-8.72 8.373-4.32 19.094-4.346 27.494-.026 4 2.053 7.36 4.96 10 8.666.426.587.293 1.44-.32 1.867a1.33 1.33 0 0 1-1.867-.32c-2.4-3.36-5.44-6-9.04-7.84-7.654-3.92-17.44-3.92-25.067.027-3.627 1.866-6.667 4.533-9.067 7.893-.213.373-.613.56-1.04.56ZM26 58.107a1.25 1.25 0 0 1-.933-.4c-2.32-2.32-3.573-3.814-5.36-7.04-1.84-3.28-2.8-7.28-2.8-11.574 0-7.92 6.773-14.373 15.093-14.373s15.093 6.453 15.093 14.373a1.32 1.32 0 0 1-1.333 1.334 1.32 1.32 0 0 1-1.333-1.334c0-6.453-5.574-11.706-12.427-11.706S19.573 32.64 19.573 39.093c0 3.84.854 7.387 2.48 10.267 1.707 3.067 2.88 4.373 4.934 6.453a1.37 1.37 0 0 1 0 1.894c-.293.266-.64.4-.987.4Zm19.12-4.934c-3.173 0-5.973-.8-8.267-2.373-3.973-2.693-6.346-7.067-6.346-11.707a1.32 1.32 0 0 1 1.333-1.333 1.32 1.32 0 0 1 1.333 1.333c0 3.76 1.92 7.307 5.174 9.494 1.893 1.28 4.106 1.893 6.773 1.893.64 0 1.707-.08 2.774-.267a1.33 1.33 0 0 1 1.546 1.094 1.33 1.33 0 0 1-1.093 1.546c-1.52.294-2.854.32-3.227.32Zm-5.36 5.494c-.106 0-.24-.027-.346-.054-4.24-1.173-7.014-2.746-9.92-5.6-3.734-3.706-5.787-8.64-5.787-13.92 0-4.32 3.68-7.84 8.213-7.84 4.533 0 8.213 3.52 8.213 7.84 0 2.854 2.48 5.174 5.547 5.174 3.067 0 5.547-2.32 5.547-5.174 0-10.053-8.667-18.213-19.333-18.213-7.574 0-14.507 4.213-17.627 10.747-1.04 2.16-1.573 4.693-1.573 7.466 0 2.08.186 5.36 1.786 9.627a1.301 1.301 0 0 1-.773 1.707A1.323 1.323 0 0 1 12 49.653c-1.306-3.493-1.947-6.96-1.947-10.56 0-3.2.614-6.106 1.814-8.64 3.546-7.44 11.413-12.266 20.026-12.266 12.134 0 22 9.36 22 20.88 0 4.32-3.68 7.84-8.213 7.84-4.533 0-8.213-3.52-8.213-7.84 0-2.854-2.48-5.174-5.547-5.174-3.067 0-5.547 2.32-5.547 5.174 0 4.56 1.76 8.826 4.987 12.026 2.534 2.507 4.96 3.894 8.72 4.934.72.186 1.12.933.934 1.626a1.301 1.301 0 0 1-1.254 1.014Z" fill="#1A73E8" /> </Svg> ) }
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: ConfigToken, // useValue: config // }, // { // provide: APP_INITIALIZER, // useFactory: appInitialize, // multi: true, // deps: [ // ConfigToken // ] // } // ] // }; // } }
CK110/ngx-antv-f2
projects/ngx-antv-f2/src/lib/basic/f2.module.ts
TypeScript