type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
(err: any): void => this.handleRejectedPromise(err, cmd, cb)
RedMokeys/cli-microsoft365
src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.ts
TypeScript
ArrowFunction
(args: CommandArgs): boolean | string => { if (!args.options.requestId) { return 'Required parameter requestId missing'; } if (!Utils.isValidGuid(args.options.requestId)) { return `${args.options.requestId} is not a valid GUID`; } return true; }
RedMokeys/cli-microsoft365
src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.ts
TypeScript
ClassDeclaration
class SpoServicePrincipalPermissionRequestDenyCommand extends SpoCommand { public get name(): string { return `${commands.SERVICEPRINCIPAL_PERMISSIONREQUEST_DENY}`; } public alias(): string[] | undefined { return [commands.SP_PERMISSIONREQUEST_DENY]; } public get description(): string { return ...
RedMokeys/cli-microsoft365
src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.ts
TypeScript
InterfaceDeclaration
interface CommandArgs { options: Options; }
RedMokeys/cli-microsoft365
src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.ts
TypeScript
InterfaceDeclaration
interface Options extends GlobalOptions { requestId: string; }
RedMokeys/cli-microsoft365
src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.ts
TypeScript
MethodDeclaration
public alias(): string[] | undefined { return [commands.SP_PERMISSIONREQUEST_DENY]; }
RedMokeys/cli-microsoft365
src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.ts
TypeScript
MethodDeclaration
public commandAction(cmd: CommandInstance, args: CommandArgs, cb: (err?: any) => void): void { let spoAdminUrl: string = ''; this .getSpoAdminUrl(cmd, this.debug) .then((_spoAdminUrl: string): Promise<ContextInfo> => { spoAdminUrl = _spoAdminUrl; if (this.verbose) { cmd....
RedMokeys/cli-microsoft365
src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.ts
TypeScript
MethodDeclaration
public options(): CommandOption[] { const options: CommandOption[] = [{ option: '-i, --requestId <requestId>', description: 'ID of the permission request to deny' }]; const parentOptions: CommandOption[] = super.options(); return options.concat(parentOptions); }
RedMokeys/cli-microsoft365
src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.ts
TypeScript
MethodDeclaration
public validate(): CommandValidate { return (args: CommandArgs): boolean | string => { if (!args.options.requestId) { return 'Required parameter requestId missing'; } if (!Utils.isValidGuid(args.options.requestId)) { return `${args.options.requestId} is not a valid GUID`; }...
RedMokeys/cli-microsoft365
src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.ts
TypeScript
MethodDeclaration
public commandHelp(args: {}, log: (help: string) => void): void { const chalk = vorpal.chalk; log(vorpal.find(commands.SERVICEPRINCIPAL_PERMISSIONREQUEST_DENY).helpInformation()); log( ` ${chalk.yellow('Important:')} to use this command you have to have permissions to access the tenant admin sit...
RedMokeys/cli-microsoft365
src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.ts
TypeScript
ArrowFunction
async () => { const server = await start(__projectroot); const browser = await puppeteer.launch({ headless: true }); const [page] = await browser.pages(); await page.goto(server.url('/test/browser/index.html')); await page.waitForSelector('#done'); const [successes, failures]: string[][] = await page.evalu...
wapc/wapc-js
test/browser/run.ts
TypeScript
ArrowFunction
() => { const win = (window as unknown) as { successes: string[]; failures: string[] }; return [win.successes, win.failures]; }
wapc/wapc-js
test/browser/run.ts
TypeScript
ArrowFunction
f => `- ${f}`
wapc/wapc-js
test/browser/run.ts
TypeScript
ArrowFunction
(ui: React.ReactElement, options?: RenderOptions) => { return render(ui, options); }
clerkinc/javascript
packages/shared/utils/testUtils.ts
TypeScript
ArrowFunction
(c: React.ReactElement) => renderer.create(c).toJSON()
clerkinc/javascript
packages/shared/utils/testUtils.ts
TypeScript
ArrowFunction
(c: React.ReactElement) => { let root; renderer.act(() => { root = renderer.create(c); }); // @ts-ignore return root.toJSON(); }
clerkinc/javascript
packages/shared/utils/testUtils.ts
TypeScript
ArrowFunction
() => { root = renderer.create(c); }
clerkinc/javascript
packages/shared/utils/testUtils.ts
TypeScript
ClassDeclaration
export class AuthModel { email: string senha: string nome: string sobrenome: string }
jeferson-menezes/blog
src/auth/model/auth.model.ts
TypeScript
FunctionDeclaration
export declare function marshalDate(val: any): object | undefined;
coda/packs-sdk
dist/runtime/common/marshaling/marshal_dates.d.ts
TypeScript
FunctionDeclaration
export declare function unmarshalDate(val: { [key: string]: any; }): Date | undefined;
coda/packs-sdk
dist/runtime/common/marshaling/marshal_dates.d.ts
TypeScript
ClassDeclaration
/** * Response object that includes metrics and metric tag configurations. */ export class MetricsAndMetricTagConfigurationsResponse { /** * Array of metrics and metric tag configurations. */ "data"?: Array<MetricsAndMetricTagConfigurations>; "unparsedObject"?: any; static readonly discriminator: stri...
jeremypike15/datadog-api-client-typescript
packages/datadog-api-client-v2/models/MetricsAndMetricTagConfigurationsResponse.ts
TypeScript
MethodDeclaration
static getAttributeTypeMap() { return MetricsAndMetricTagConfigurationsResponse.attributeTypeMap; }
jeremypike15/datadog-api-client-typescript
packages/datadog-api-client-v2/models/MetricsAndMetricTagConfigurationsResponse.ts
TypeScript
MethodDeclaration
static deserialize(data: { [key: string]: any; }): MetricsAndMetricTagConfigurationsResponse { const res = new MetricsAndMetricTagConfigurationsResponse(); res.data = ObjectSerializer.deserialize( data.data, "Array<MetricsAndMetricTagConfigurations>", "" ); return res; }
jeremypike15/datadog-api-client-typescript
packages/datadog-api-client-v2/models/MetricsAndMetricTagConfigurationsResponse.ts
TypeScript
MethodDeclaration
static serialize(data: MetricsAndMetricTagConfigurationsResponse): { [key: string]: any; } { const attributeTypes = MetricsAndMetricTagConfigurationsResponse.getAttributeTypeMap(); const res: { [index: string]: any } = {}; for (const [key, value] of Object.entries(data)) { if (!(key in at...
jeremypike15/datadog-api-client-typescript
packages/datadog-api-client-v2/models/MetricsAndMetricTagConfigurationsResponse.ts
TypeScript
FunctionDeclaration
function SvgCloudHail(props: IconPresetProps, svgRef?: React.Ref<SVGSVGElement>) { return ( <Icon {...props}> <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' preserveAspectRatio='xMidYMid meet' fill='currentColor' ...
mountain-ui/mountain-ui
packages/icons/src/icons/CloudHail.tsx
TypeScript
ArrowFunction
(appReview) => { if (!appReview){ this.error = new NotFoundError(); return false; } this.appReview = appReview; return true; }
devLeonardoTS/Heroku_TodoListApp_Server
src/services/user/applicationReview/GetApplicationReviewService.ts
TypeScript
ArrowFunction
(appReviewRetrievalError) => { this.error = PrismaUtils.handleRetrievalError(appReviewRetrievalError); return false; }
devLeonardoTS/Heroku_TodoListApp_Server
src/services/user/applicationReview/GetApplicationReviewService.ts
TypeScript
ClassDeclaration
export class GetApplicationReviewService extends ApplicationService<IGetApplicationReviewResponse> { private requestedAppReviewUid: string; private appReview: ApplicationReview | null; private displayableAppReview: IDisplayableApplicationReviewData | null; constructor(requestedAppReviewUid: strin...
devLeonardoTS/Heroku_TodoListApp_Server
src/services/user/applicationReview/GetApplicationReviewService.ts
TypeScript
MethodDeclaration
async execute(): Promise<boolean> { if (!await this.getRequestedAppReview(this.requestedAppReviewUid)){ return false; } if (!this.appReview){ if (!this.error){ this.error = new UnexpectedError(); } return false; } this.displayableAppReview = new DisplayableApp...
devLeonardoTS/Heroku_TodoListApp_Server
src/services/user/applicationReview/GetApplicationReviewService.ts
TypeScript
MethodDeclaration
private async getRequestedAppReview(requestedAppReviewUid: string): Promise<boolean> { return await prismaClient.applicationReview .findUnique({ where: { uid: requestedAppReviewUid } }) .then((appReview) => { if (!appReview){ ...
devLeonardoTS/Heroku_TodoListApp_Server
src/services/user/applicationReview/GetApplicationReviewService.ts
TypeScript
FunctionDeclaration
function Landing() { const [totalConnections, setTotalConnections] = useState(0); useEffect(() => { api.get('connections').then(response => { const { total } = response.data; setTotalConnections(total); }); }, []); return ( <div id="page-landing"> <div id="page-landing-content"...
YamRibas2004/Proffy
web/src/pages/Landing/index.tsx
TypeScript
ArrowFunction
() => { api.get('connections').then(response => { const { total } = response.data; setTotalConnections(total); }); }
YamRibas2004/Proffy
web/src/pages/Landing/index.tsx
TypeScript
ArrowFunction
response => { const { total } = response.data; setTotalConnections(total); }
YamRibas2004/Proffy
web/src/pages/Landing/index.tsx
TypeScript
ArrowFunction
({items}): ReactElement => { return ( <Fragment> {items.map((item: LayoutItemsList): JSX.Element => { const itemRow = ( <Fragment key={generateRandomId () + item.id}> <span> <span>&nbsp;</span> <span className="por-attr">class</span> <...
mardarov-artiom/EasyLayout
src/components/PageOutputHTML/index.tsx
TypeScript
ArrowFunction
(item: LayoutItemsList): JSX.Element => { const itemRow = ( <Fragment key={generateRandomId () + item.id}
mardarov-artiom/EasyLayout
src/components/PageOutputHTML/index.tsx
TypeScript
MethodDeclaration
generateRandomId ()
mardarov-artiom/EasyLayout
src/components/PageOutputHTML/index.tsx
TypeScript
MethodDeclaration
classNames(item,' ')
mardarov-artiom/EasyLayout
src/components/PageOutputHTML/index.tsx
TypeScript
MethodDeclaration
generateRandomId()
mardarov-artiom/EasyLayout
src/components/PageOutputHTML/index.tsx
TypeScript
ArrowFunction
(resolve) => { resolve(options); }
megaboy101/cinema-microservice
packages/booking/src/services/Notification.ts
TypeScript
ClassDeclaration
export class Notification { public static serve(options: any): Promise<any> { return new Promise((resolve) => { resolve(options); }); } }
megaboy101/cinema-microservice
packages/booking/src/services/Notification.ts
TypeScript
MethodDeclaration
public static serve(options: any): Promise<any> { return new Promise((resolve) => { resolve(options); }); }
megaboy101/cinema-microservice
packages/booking/src/services/Notification.ts
TypeScript
ArrowFunction
({ lastConnection, lastDisconnection, online }: Props) => { if (online) { return ( <FormattedMessage id="components.LastSeen.now" defaultMessage="Now" />
bejolithic/honeyland
frontend/src/components/LastSeen.tsx
TypeScript
TypeAliasDeclaration
type Props = { lastConnection: string | null; lastDisconnection: string | null; online: boolean; };
bejolithic/honeyland
frontend/src/components/LastSeen.tsx
TypeScript
ArrowFunction
() => { it('uses route params from child, then parent routes', () => { const route = { params: {'barId': '456'}, paramMap: convertToParamMap({'barId': '456'}), queryParams: {}, data: {legacyLink: '#/foo/:fooId/bar/:barId'}, parent: { params: {'fooId': '123'}, paramMa...
BA7JCM/grr
grr/server/grr_response_server/gui/ui/lib/routing_test.ts
TypeScript
ArrowFunction
() => { const route = { params: {'barId': '456'}, paramMap: convertToParamMap({'barId': '456'}), queryParams: {}, data: {legacyLink: '#/foo/:fooId/bar/:barId'}, parent: { params: {'fooId': '123'}, paramMap: convertToParamMap({'fooId': '123'}), queryParams: {}, ...
BA7JCM/grr
grr/server/grr_response_server/gui/ui/lib/routing_test.ts
TypeScript
ArrowFunction
() => { return ( <div className={styles.chat}> <div className={styles.head}> xxx-Group </div> <div className={styles.content}> <MessageBox /> <MemberList /> </div> </div>
tanf1995/WebChart
web-chat/src/views/ChatPage/index.tsx
TypeScript
ArrowFunction
fs => { if(this._inited) { let queryParams = this._filters.queryParams; if(JSON.stringify(queryParams) == JSON.stringify(this._lastQueryParams)) { if(this._refresh) { this._refresh = false; this._performSearch(); } return; } //...
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
ArrowFunction
params => { this._filters.loadQuery(params); setTimeout(this.initSearch.bind(this), 50); }
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
ArrowFunction
params => { this.filterType = params['filterType']; }
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
ArrowFunction
val => new Promise(resolve => { if(val && val.data) { let ids = {}; for(let row of val.data) { ids[row.credential_type.id] = 1; } if(ids) { return this._dataService.preloadCredentialTypeLanguage(...Object.keys(ids)).then(_ => { resolve(val); ...
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
ArrowFunction
resolve => { if(val && val.data) { let ids = {}; for(let row of val.data) { ids[row.credential_type.id] = 1; } if(ids) { return this._dataService.preloadCredentialTypeLanguage(...Object.keys(ids)).then(_ => { resolve(val); }); } ...
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
ArrowFunction
_ => { resolve(val); }
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-search', templateUrl: '../../themes/_active/search/form.component.html', styleUrls: ['../../themes/_active/search/form.component.scss'] }) export class SearchComponent implements OnInit, OnDestroy, AfterViewInit { @ViewChild('searchInput') _searchInput: SearchInputComponent; @Vie...
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
MethodDeclaration
ngOnInit() { this._filters.stream.subscribe(fs => { if(this._inited) { let queryParams = this._filters.queryParams; if(JSON.stringify(queryParams) == JSON.stringify(this._lastQueryParams)) { if(this._refresh) { this._refresh = false; this._performSearch(); ...
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
MethodDeclaration
/*test(credTypeId, val) { return this._dataService.translateClaimLabel(credTypeId, val); }*/ ngAfterViewInit() { if(this._searchInput) { this._searchInput.value = this._filters.getFieldValue('q'); } }
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
MethodDeclaration
ngOnDestroy() { this._querySub.unsubscribe(); this._typeSub.unsubscribe(); this._filters.complete(); this._loader.complete(); }
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
MethodDeclaration
public handleFacets(data) { let options = this._dataService.loadFacetOptions(data); for(let name in options) { this._filters.setOptions(name, options[name]); } }
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
MethodDeclaration
public handleNav(nav: string) { if (nav === 'previous') { this._filters.setFieldValue('page', Math.max(this.pageNum - 1, 1)); this._loader.reset(); } else if (nav == 'next') { this._filters.setFieldValue('page', this.pageNum + 1); this._loader.reset(); } else { console.warn(`I...
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
MethodDeclaration
public updateQuery() { if(this._searchInput) { this._loader.reset(); this._refresh = true; this._filters.update({ q: this._searchInput.value, page: '1' }); } }
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
MethodDeclaration
public initSearch() { if(this._searchInput) this._searchInput.value = this._filters.getFieldValue('q'); this._inited = true; this._performSearch(); }
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
MethodDeclaration
_performSearch() { let query = this._filters.values; if('q' in query && query['q'] !== '') { this._dataService.loadList(this._loader, {query}); } else { this._loader.reset(); } }
SmartLoan/southern-aries-vcr
client/src/app/search/form.component.ts
TypeScript
ArrowFunction
(key: string) => { const rules = data[key]; if (!rules) return; Object.keys(rules).forEach((ruleKey: string) => { const value = rules[ruleKey]; if (!(typeof value === 'function' || typeof value === 'object' || typeof value === 'string')) { throw Error( `mock valu...
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
(ruleKey: string) => { const value = rules[ruleKey]; if (!(typeof value === 'function' || typeof value === 'object' || typeof value === 'string')) { throw Error( `mock value of [${key}-${ruleKey}] should be function or object or string, but got ${typeof value}` ); ...
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
w => w.url === rule.url && w.method === rule.method
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
(a, b) => (b.martcher || '').toString().length - (a.martcher || '').toString().length
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
segment => segment.startsWith(':')
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
v => v.substring(1)
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
segment => (segment.startsWith(':') ? `([^/]+)` : segment)
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
line => line.trim().indexOf('at ') !== 0
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
line => line.replace(`${filePath}: `, '')
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
w => w.method === method && (w.martcher ? w.martcher.test(url) : w.url === url)
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
w => w.url === url
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
(value: string, index: number) => { params[ret.segments[index]] = value; }
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ClassDeclaration
@Injectable({ providedIn: 'root' }) export class MockService implements OnDestroy { private cached: MockCachedRule[] = []; readonly config: YunzaiMockConfig; constructor(cogSrv: YunzaiConfigService, options: MockOptions) { this.config = cogSrv.merge('mock', MOCK_DEFULAT_CONFIG)!; this.setData(options?.d...
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
MethodDeclaration
/** * Reset request data * * 重新设置请求数据 */ setData(data: NzSafeAny): void { this.applyMock(data); }
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
MethodDeclaration
// #region parse rule private applyMock(data: NzSafeAny): void { this.cached = []; try { this.realApplyMock(data); } catch (e) { this.outputError(e); } }
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
MethodDeclaration
private realApplyMock(data: NzSafeAny): void { if (!data) return; Object.keys(data).forEach((key: string) => { const rules = data[key]; if (!rules) return; Object.keys(rules).forEach((ruleKey: string) => { const value = rules[ruleKey]; if (!(typeof value === 'function' || type...
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
MethodDeclaration
private genRule(key: string, callback: NzSafeAny): MockCachedRule { let method = 'GET'; let url = key; if (key.indexOf(' ') > -1) { const splited = key.split(' '); method = splited[0].toLowerCase(); url = splited[1]; } let martcher: RegExp | null = null; let segments: string...
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
MethodDeclaration
private outputError(error: NzSafeAny): void { const filePath = error.message.split(': ')[0]; const errors = (error.stack as string) .split('\n') .filter(line => line.trim().indexOf('at ') !== 0) .map(line => line.replace(`${filePath}: `, '')); errors.splice(1, 0, ''); console.group()...
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
MethodDeclaration
// #endregion getRule(method: string, url: string): MockRule | null { method = (method || 'GET').toUpperCase(); const params: NzSafeAny = {}; const list = this.cached.filter(w => w.method === method && (w.martcher ? w.martcher.test(url) : w.url === url)); if (list.length === 0) return null; const re...
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
MethodDeclaration
clearCache(): void { this.cached = []; }
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
MethodDeclaration
ngOnDestroy(): void { this.clearCache(); }
hbyunzai/yelon
packages/mock/src/mock.service.ts
TypeScript
ArrowFunction
kind => url += '&kinds=' + kind
donhuvy/cyclos4-ui
src/app/core/push-notifications.service.ts
TypeScript
ArrowFunction
(event: any) => { this.zone.run(() => { const data = empty(event.data) ? null : JSON.parse(event.data); if (kind === PushNotificationEventKind.LOGGED_OUT) { // Close the EventSource immediately after being logged out this.close(); } subject.next(data); })...
donhuvy/cyclos4-ui
src/app/core/push-notifications.service.ts
TypeScript
ArrowFunction
() => { const data = empty(event.data) ? null : JSON.parse(event.data); if (kind === PushNotificationEventKind.LOGGED_OUT) { // Close the EventSource immediately after being logged out this.close(); } subject.next(data); }
donhuvy/cyclos4-ui
src/app/core/push-notifications.service.ts
TypeScript
ClassDeclaration
/** * Handles the registration and notitification of push events */ @Injectable({ providedIn: 'root', }) export class PushNotificationsService { private eventSource: EventSourcePolyfill; public loggedOut$ = new Subject<void>(); public permissionsChanged$ = new Subject<void>(); public newNotifications$ = n...
donhuvy/cyclos4-ui
src/app/core/push-notifications.service.ts
TypeScript
MethodDeclaration
/** * Opens the stream. Must be called when there's a logged user */ open() { if (this.eventSource) { // Already opened return; } const kinds = new Set<string>(Kinds); let url = urlJoin(this.apiConfiguration.rootUrl, 'push', 'subscribe') + '?clientId=' + ClientId; kinds.forEach(kin...
donhuvy/cyclos4-ui
src/app/core/push-notifications.service.ts
TypeScript
MethodDeclaration
/** * Opens the stream. Must be called when there's a logged user */ openForIdentityProviderCallback(requestId: string) { if (this.eventSource) { // Already opened return; } const url = urlJoin(this.apiConfiguration.rootUrl, 'push', 'subscribe') + `?clientId=${ClientId}&kinds=` ...
donhuvy/cyclos4-ui
src/app/core/push-notifications.service.ts
TypeScript
MethodDeclaration
/** * Closes the stream */ close() { if (this.eventSource) { this.eventSource.close(); this.eventSource = null; } }
donhuvy/cyclos4-ui
src/app/core/push-notifications.service.ts
TypeScript
MethodDeclaration
private setupListener(kind: PushNotificationEventKind, subject: Subject<any>) { this.eventSource.addEventListener(kind, (event: any) => { this.zone.run(() => { const data = empty(event.data) ? null : JSON.parse(event.data); if (kind === PushNotificationEventKind.LOGGED_OUT) { // Clo...
donhuvy/cyclos4-ui
src/app/core/push-notifications.service.ts
TypeScript
ClassDeclaration
export class UpdateUserDto { @IsNotEmpty() @IsMongoId() _id: string; @IsOptional() @MinLength(2) @IsString() name?: string; @IsOptional() @MinLength(2) @IsString() surname?: string; @IsOptional() @MinLength(2) @IsString() patronymic?: string; @IsOptional() @IsString() avatarId?:...
vtimame/labilab_id_api
src/user/dto/update-user.dto.ts
TypeScript
ArrowFunction
taskData => { return taskData.tasks.map(task => { return { title: task.title, content: task.content, status: task.status, assignedTo: task.assignedTo, createdBy: task.createdBy, _id: task._id }; ...
nliebhartbellevue/nodebucket
src/app/task/task.service.ts
TypeScript
ArrowFunction
task => { return { title: task.title, content: task.content, status: task.status, assignedTo: task.assignedTo, createdBy: task.createdBy, _id: task._id }; }
nliebhartbellevue/nodebucket
src/app/task/task.service.ts
TypeScript
ArrowFunction
transformedTasks => { console.log(transformedTasks); this.tasks = transformedTasks; this.tasksUpdated.next({ tasks: [...this.tasks] }); }
nliebhartbellevue/nodebucket
src/app/task/task.service.ts
TypeScript
ArrowFunction
taskData => { return taskData.tasks.map(task => { return { _id: task._id, title: task.title, content: task.content, status: task.status, assignedTo: task.assignedTo, createdBy: task.createdBy }; ...
nliebhartbellevue/nodebucket
src/app/task/task.service.ts
TypeScript
ArrowFunction
task => { return { _id: task._id, title: task.title, content: task.content, status: task.status, assignedTo: task.assignedTo, createdBy: task.createdBy }; }
nliebhartbellevue/nodebucket
src/app/task/task.service.ts
TypeScript
ArrowFunction
responseData => { // tslint:disable-next-line:variable-name const _id = responseData.taskId; task._id = _id; this.tasks.push(task); this.tasksUpdated.next({ tasks: [...this.tasks] }); this.router.navigate(['/']); }
nliebhartbellevue/nodebucket
src/app/task/task.service.ts
TypeScript
ArrowFunction
response => { if (response) { console.log(response); const updatedTasks = [...this.tasks]; const oldTaskIndex = updatedTasks.findIndex(t => t._id === task._id); updatedTasks[oldTaskIndex] = task; this.tasks = updatedTasks; this.tasksUpdated.next({ ...
nliebhartbellevue/nodebucket
src/app/task/task.service.ts
TypeScript
ArrowFunction
t => t._id === task._id
nliebhartbellevue/nodebucket
src/app/task/task.service.ts
TypeScript
ArrowFunction
err => { console.log(err); }
nliebhartbellevue/nodebucket
src/app/task/task.service.ts
TypeScript