type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
MethodDeclaration
private updateLayout() { if (this.layoutDimensions && this.ui) { const titlebarOffset = this.partService.getTitleBarOffset(); this.ui.container.style.top = `${titlebarOffset}px`; const style = this.ui.container.style; const width = Math.min(this.layoutDimensions.width * 0.62 /* golden cut */, QuickInput...
DalavanCloud/vscode
src/vs/workbench/browser/parts/quickinput/quickInput.ts
TypeScript
MethodDeclaration
protected updateStyles() { const theme = this.themeService.getTheme(); if (this.ui) { // TODO const titleColor = { dark: 'rgba(255, 255, 255, 0.105)', light: 'rgba(0,0,0,.06)', hc: 'black' }[theme.type]; this.titleBar.style.backgroundColor = titleColor ? titleColor.toString() : null; this.ui.inputBox.s...
DalavanCloud/vscode
src/vs/workbench/browser/parts/quickinput/quickInput.ts
TypeScript
MethodDeclaration
private isDisplayed() { return this.ui && this.ui.container.style.display !== 'none'; }
DalavanCloud/vscode
src/vs/workbench/browser/parts/quickinput/quickInput.ts
TypeScript
MethodDeclaration
public run(): TPromise<any> { this.quickInputService.back(); return TPromise.as(null); }
DalavanCloud/vscode
src/vs/workbench/browser/parts/quickinput/quickInput.ts
TypeScript
FunctionDeclaration
// Type definitions for clone-deep 4.0 // Project: https://github.com/jonschlinkert/clone-deep // Definitions by: Tanfonto <https://github.com/tanfonto> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.7 declare function cloneDeep<T>( val: T, instanceClone?: true | ((val: ...
0-Captain/DefinitelyTyped
types/clone-deep/index.d.ts
TypeScript
ArrowFunction
( err: null | Error, channel?: Channel, message?: IMessage, options?: IOptions | null, ): void => { if (err) return callback(err); const currentMiddleware = this.incomingMiddleware[index]; index = index - 1; if (...
MarcRoemmelt/servicebus-ts
lib/bus/Bus/index.ts
TypeScript
ArrowFunction
( err: null | Error, queueName?: string, message?: Record<string, any>, options?: IOptions | null, ) => { if (err) return callback(err); const currentMiddleware = this.outgoingMiddleware[index]; index++; if (unde...
MarcRoemmelt/servicebus-ts
lib/bus/Bus/index.ts
TypeScript
ClassDeclaration
export class Bus extends EventEmitter { incomingMiddleware: IIncomingFn[] = []; outgoingMiddleware: IOutgoingFn[] = []; constructor() { super(); this.setMaxListeners(Infinity); } public use(middleware: Middleware): Bus { if (middleware.handleIncoming) this.incomingMiddlewa...
MarcRoemmelt/servicebus-ts
lib/bus/Bus/index.ts
TypeScript
MethodDeclaration
public use(middleware: Middleware): Bus { if (middleware.handleIncoming) this.incomingMiddleware.push(middleware.handleIncoming); if (middleware.handleOutgoing) this.outgoingMiddleware.push(middleware.handleOutgoing); return this; }
MarcRoemmelt/servicebus-ts
lib/bus/Bus/index.ts
TypeScript
MethodDeclaration
public handleIncoming( channel: Channel, message: IMessage, options: Record<string, any>, callback: (err: null | Error, channel?: Channel, message?: IMessage, options?) => void, ): any { let index = this.incomingMiddleware.length - 1; const nextFn: IIncomingNextFn =...
MarcRoemmelt/servicebus-ts
lib/bus/Bus/index.ts
TypeScript
MethodDeclaration
public handleOutgoing( queueName: string, message: Record<string, any>, options: Record<string, any>, callback: (...args: any[]) => void, ): any { let index = 0; const next: IOutgoingNextFn = ( err: null | Error, queueName?: string, ...
MarcRoemmelt/servicebus-ts
lib/bus/Bus/index.ts
TypeScript
MethodDeclaration
public createCorrelationId(forceNew?: boolean): string { if (process.domain && process.domain.correlationId && !forceNew) { return process.domain.correlationId; } return readableId(); }
MarcRoemmelt/servicebus-ts
lib/bus/Bus/index.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-navbar', templateUrl: './navbar.component.html', styleUrls: ['./navbar.component.css'], }) export class NavBarComponent { faAngular = faAngular; faGithub = faGithub; faLinkedin = faLinkedin; locales = [ {path: '/en-us/', label: 'English US', devPort: 4201}, {path: '/...
hhangular/hhangular
src/app/navbar/navbar.component.ts
TypeScript
ArrowFunction
(res: any) => res
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
ArrowFunction
(uiConfig) => { this.uiConfigState.next(this.uiConfig = uiConfig); this.uiConfigState.complete(); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
ClassDeclaration
@Injectable() export class XmConfigService { private configUrl: string = 'config/api/profile'; private configMaintenanceUrl: string = 'config/api/config'; private uaaPasswordConfigUrl: string = 'uaa/api/uaa/properties/settings-public'; private elasticReindexUrl: string = '/entity/api/elasticsearch/ind...
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
InterfaceDeclaration
interface IUIConfig { logoUrl?: string; name?: string; iconsInMenu?: string; }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
TypeAliasDeclaration
export type UIConfig = IUIConfig | any;
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public validateTimelineSpec(configContent: string): Observable<any> { return this.http.post('timeline/api/timelines/properties/validate', configContent, this.headers()).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public updateTimelineSpec(configContent: string): Observable<any> { return this.http.post('timeline/api/timelines/properties', configContent, this.headers()).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
/** @deprecated use XmEntitySpecService update instead */ public updateXmEntitySpec(configContent: string): Observable<any> { return this.http.post('entity/api/xm-entity-specs', configContent, this.headers()).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public updateConfig(configPath: string, configContent: string): Observable<any> { return this.http.put(this.configUrl + configPath, configContent, this.headers()).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public updateTenantSpec(configPath: string, configContent: string): Observable<any> { return this.http.put(this.configUrl + configPath, configContent, this.headers()).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public getConfig(configPath: string): Observable<string> { return this.http.get(this.configUrl + configPath, {responseType: 'text'}).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public getPasswordConfig(): Observable<string> { return this.http.get(this.uaaPasswordConfigUrl, {responseType: 'text'}).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public getUiConfigData(): void { if (this.uiConfig) { this.uiConfigState.next(this.uiConfig); } else { this.getConfigJson('/webapp/settings-public.yml?toJson&processed=true').subscribe((uiConfig) => { this.uiConfigState.next(this.uiConfig = uiConfig); ...
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public getUiConfig(): Observable<UIConfig> { return of(this.appConfig.getAppConfig()); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public getConfigJson(configPath: string): Observable<any> { return this.http.get(this.configUrl + configPath).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public getLoginsSpec(): Observable<any> { return this.http.get('uaa/api/logins').pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public validateLoginsSpec(configContent: string): Observable<any> { return this.http.post('uaa/api/logins/validate', configContent, this.headers()).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public updateLoginsSpec(configContent: string): Observable<any> { return this.http.post('uaa/api/logins', configContent, this.headers()).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public validateUaaSpec(configContent: string): Observable<any> { return this.http.post('uaa/api/uaa/properties/validate', configContent, this.headers()).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public updateUaaSpec(configContent: string): Observable<any> { return this.http.post('uaa/api/uaa/properties', configContent, this.headers()).pipe( map((res: any) => res)); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public reindexTenantElastic(): Observable<any> { return this.http.post(this.elasticReindexUrl, {}); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public updateTenantsConfig(): Observable<any> { // TODO: Fix method to return JSON return this.http.post(this.configMaintenanceUrl + '/refresh', {}); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public updateTenantConfig(): Observable<any> { // TODO: Fix method to return JSON return this.http.post(this.configUrl + '/refresh', {}); }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public mapPasswordSettings(config?: any): PasswordSpec { const DEFAULT_SETTINGS = { minLength: 4, maxLength: 50, pattern: '', patternMessage: null, }; if (!config) {return DEFAULT_SETTINGS; } const CONFIG_PARSED = JSON.parse(config); ...
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
public updatePatternMessage(message: any, currentLang?: string): string { const lang = currentLang ? currentLang : this.modulesLangHelper.getLangKey(); return message[lang] || message; }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
MethodDeclaration
private headers(): any { return {headers: new HttpHeaders({'Content-Type': 'text/plain'})}; }
icthothouse/xm-webapp
src/app/shared/spec/config.service.ts
TypeScript
ArrowFunction
async () => { const mockFn = sinon.fake(); const observable = storeFactory(true); observable.subscribe(mockFn); sinon.assert.calledOnce(mockFn); sinon.assert.calledWith(mockFn, true); observable.update((v) => !v); await waitFor(() => { sinon.assert.calledTwice(mockFn); sinon.assert.calledWith(mo...
eltociear/felte
packages/solid/tests/stores.spec.ts
TypeScript
ArrowFunction
(v) => !v
eltociear/felte
packages/solid/tests/stores.spec.ts
TypeScript
ArrowFunction
() => { sinon.assert.calledTwice(mockFn); sinon.assert.calledWith(mockFn, false); }
eltociear/felte
packages/solid/tests/stores.spec.ts
TypeScript
ArrowFunction
async () => { const mockFn = sinon.fake(); const observable = storeFactory(true); observable.subscribe(mockFn); sinon.assert.calledOnce(mockFn); sinon.assert.calledWith(mockFn, true); observable.set(false); await waitFor(() => { sinon.assert.calledTwice(mockFn); sinon.assert.calledWith(mockFn, f...
eltociear/felte
packages/solid/tests/stores.spec.ts
TypeScript
ArrowFunction
({ popoverClick }: Props): JSX.Element => { const { narrativeStage, setShowRain } = useNarrative() useEffect(() => { if (narrativeStage >= 1) { setShowRain(true) } else { setShowRain(false) } }, [narrativeStage]) return ( <div className="UtilitySystemsTableau"> <SVGFrame id=...
plot-and-scatter/living-breakwaters-web
src/components/Narratives/UtilitySystems/UtilitySystemsTableau.tsx
TypeScript
ArrowFunction
() => { if (narrativeStage >= 1) { setShowRain(true) } else { setShowRain(false) } }
plot-and-scatter/living-breakwaters-web
src/components/Narratives/UtilitySystems/UtilitySystemsTableau.tsx
TypeScript
ArrowFunction
(e) => popoverClick(e, PKey.Outflow)
plot-and-scatter/living-breakwaters-web
src/components/Narratives/UtilitySystems/UtilitySystemsTableau.tsx
TypeScript
ArrowFunction
(e) => popoverClick(e, PKey.SewageBackup)
plot-and-scatter/living-breakwaters-web
src/components/Narratives/UtilitySystems/UtilitySystemsTableau.tsx
TypeScript
InterfaceDeclaration
interface Props { popoverClick?: (e: Event, contentKey: string) => void }
plot-and-scatter/living-breakwaters-web
src/components/Narratives/UtilitySystems/UtilitySystemsTableau.tsx
TypeScript
FunctionDeclaration
/** @ignore */ export declare function memcpy<TTarget extends ArrayBufferView, TSource extends ArrayBufferView>(target: TTarget, source: TSource, targetByteOffset?: number, sourceByteLength?: number): TTarget;
graphistry/arrow
util/buffer.d.ts
TypeScript
FunctionDeclaration
/** @ignore */ export declare function joinUint8Arrays(chunks: Uint8Array[], size?: number | null): [Uint8Array, Uint8Array[], number];
graphistry/arrow
util/buffer.d.ts
TypeScript
FunctionDeclaration
/** @ignore */ export declare function toArrayBufferView<T extends TypedArray>(ArrayBufferViewCtor: TypedArrayConstructor<T>, input: ArrayBufferViewInput): T;
graphistry/arrow
util/buffer.d.ts
TypeScript
FunctionDeclaration
export declare function toArrayBufferView<T extends BigIntArray>(ArrayBufferViewCtor: BigIntArrayConstructor<T>, input: ArrayBufferViewInput): T;
graphistry/arrow
util/buffer.d.ts
TypeScript
FunctionDeclaration
/** @ignore */ export declare function toArrayBufferViewIterator<T extends TypedArray>(ArrayCtor: TypedArrayConstructor<T>, source: ArrayBufferViewIteratorInput): IterableIterator<T>;
graphistry/arrow
util/buffer.d.ts
TypeScript
FunctionDeclaration
/** @ignore */ export declare function toArrayBufferViewAsyncIterator<T extends TypedArray>(ArrayCtor: TypedArrayConstructor<T>, source: ArrayBufferViewAsyncIteratorInput): AsyncIterableIterator<T>;
graphistry/arrow
util/buffer.d.ts
TypeScript
FunctionDeclaration
/** @ignore */ export declare function rebaseValueOffsets(offset: number, length: number, valueOffsets: Int32Array): Int32Array;
graphistry/arrow
util/buffer.d.ts
TypeScript
FunctionDeclaration
/** @ignore */ export declare function compareArrayLike<T extends ArrayLike<any>>(a: T, b: T): boolean;
graphistry/arrow
util/buffer.d.ts
TypeScript
TypeAliasDeclaration
/** @ignore */ export declare type ArrayBufferViewInput = ArrayBufferView | ArrayBufferLike | ArrayBufferView | Iterable<number> | ArrayLike<number> | ByteBuffer | string | null | undefined | IteratorResult<ArrayBufferView | ArrayBufferLike | ArrayBufferView | Iterable<number> | ArrayLike<number> | ByteBuffer | string ...
graphistry/arrow
util/buffer.d.ts
TypeScript
TypeAliasDeclaration
/** @ignore */ declare type ArrayBufferViewIteratorInput = Iterable<ArrayBufferViewInput> | ArrayBufferViewInput;
graphistry/arrow
util/buffer.d.ts
TypeScript
TypeAliasDeclaration
/** @ignore */ declare type ArrayBufferViewAsyncIteratorInput = AsyncIterable<ArrayBufferViewInput> | Iterable<ArrayBufferViewInput> | PromiseLike<ArrayBufferViewInput> | ArrayBufferViewInput;
graphistry/arrow
util/buffer.d.ts
TypeScript
ClassDeclaration
@Component({ selector: 'd-demo-time-axis-template-content', templateUrl: './time-axis-template-content.component.html' }) export class TimeAxisTemplateContentComponent implements AfterViewInit { @ViewChild('yearShow') yearShow: TemplateRef<any>; timeAxisTemplate = { direction: 'horizontal', model: 'tem...
DevCloudFE/ng-devui
devui/time-axis/demo/template-content/time-axis-template-content.component.ts
TypeScript
MethodDeclaration
ngAfterViewInit() { this.timeAxisTemplate.list[0].extraElement = this.yearShow; }
DevCloudFE/ng-devui
devui/time-axis/demo/template-content/time-axis-template-content.component.ts
TypeScript
ArrowFunction
async ( root: any, args: { [key: string]: any }, context: { [key: string]: any } ) => { const { locales } = context; try { await locales.create({ code: args.data.code, default: true }); await locales.updateDefault(args.data.code); } catch (e) { return new ErrorResponse(...
Site-Command/webiny-js
packages/api-i18n/src/graphql/graphql/resolvers/install.ts
TypeScript
ArrowFunction
async ( root: any, args: { [key: string]: any }, context: { [key: string]: any } ) => { const { security } = context; if (!security.getTenant()) { return false; } const { locales } = context; const defaultLocale = await locales.getDefault(); return new Response(Boolean(defa...
Site-Command/webiny-js
packages/api-i18n/src/graphql/graphql/resolvers/install.ts
TypeScript
ArrowFunction
() => { return ( <g id="Hairstyle/-37" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd" strokeLinecap="round" strokeLinejoin="round" transform="translate(264.000000, 290.000000)" > <path fillRule="evenodd" clipRule="evenodd" ...
miqilin21/react-notion-avatar
src/package/hair/37.tsx
TypeScript
ClassDeclaration
export class EventDispatcher { constructor(private _sink: EventEmitter<any>, private _serializer: Serializer) {} dispatchAnimationEvent(player: any, phaseName: string, element: any): boolean { this._sink.emit({ 'element': this._serializer.serialize(element, SerializerTypes.RENDER_STORE_OBJECT), 'a...
johnfedoruk/bangular
packages/platform-webworker/src/web_workers/ui/event_dispatcher.ts
TypeScript
MethodDeclaration
dispatchAnimationEvent(player: any, phaseName: string, element: any): boolean { this._sink.emit({ 'element': this._serializer.serialize(element, SerializerTypes.RENDER_STORE_OBJECT), 'animationPlayer': this._serializer.serialize(player, SerializerTypes.RENDER_STORE_OBJECT), 'phaseName': phaseName...
johnfedoruk/bangular
packages/platform-webworker/src/web_workers/ui/event_dispatcher.ts
TypeScript
MethodDeclaration
dispatchRenderEvent(element: any, eventTarget: string, eventName: string, event: any): boolean { let serializedEvent: any; // TODO (jteplitz602): support custom events #3350 switch (event.type) { case 'click': case 'mouseup': case 'mousedown': case 'dblclick': case 'contextmen...
johnfedoruk/bangular
packages/platform-webworker/src/web_workers/ui/event_dispatcher.ts
TypeScript
ClassDeclaration
export default class CreateUsers1593868207627 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise<void> { await queryRunner.createTable( new Table({ name: 'users', columns: [ { name: 'id', type: 'uuid', isPrimary: ...
yuripalacio/championships-creator
back_end/src/shared/infra/typeorm/migrations/1593868207627-CreateUsers.ts
TypeScript
MethodDeclaration
public async up(queryRunner: QueryRunner): Promise<void> { await queryRunner.createTable( new Table({ name: 'users', columns: [ { name: 'id', type: 'uuid', isPrimary: true, generationStrategy: 'uuid', default: 'uuid_generat...
yuripalacio/championships-creator
back_end/src/shared/infra/typeorm/migrations/1593868207627-CreateUsers.ts
TypeScript
MethodDeclaration
public async down(queryRunner: QueryRunner): Promise<void> { await queryRunner.dropTable('users'); }
yuripalacio/championships-creator
back_end/src/shared/infra/typeorm/migrations/1593868207627-CreateUsers.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-complete-ico', templateUrl: './complete-ico.component.html' }) export class CompleteIcoComponent implements OnInit { constructor(private router: Router) { } ngOnInit() { particlesJS.load('particles-js', 'assets/js/particles.json', function() {}); } landing(){ this.rou...
ProofSuite/TokenSaleDashboard
src/app/user-auth/complete-ico/complete-ico.component.ts
TypeScript
MethodDeclaration
ngOnInit() { particlesJS.load('particles-js', 'assets/js/particles.json', function() {}); }
ProofSuite/TokenSaleDashboard
src/app/user-auth/complete-ico/complete-ico.component.ts
TypeScript
MethodDeclaration
landing(){ this.router.navigate(["/"]); }
ProofSuite/TokenSaleDashboard
src/app/user-auth/complete-ico/complete-ico.component.ts
TypeScript
ArrowFunction
() => { const css = useStyles2(getStyles); return ( <> <div data-testid="explore-no-data" className={cx([css.wrapper, 'panel-container'])}> <span className={cx([css.message])}>{'No data'}</span> </div> </>
raymondchen625/grafana
public/app/features/explore/NoData.tsx
TypeScript
ArrowFunction
(theme: GrafanaTheme2) => ({ wrapper: css` label: no-data-card; padding: ${theme.spacing(3)}; background: ${theme.colors.background.primary}; border-radius: ${theme.shape.borderRadius(2)}; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-gr...
raymondchen625/grafana
public/app/features/explore/NoData.tsx
TypeScript
MethodDeclaration
cx([css
raymondchen625/grafana
public/app/features/explore/NoData.tsx
TypeScript
ClassDeclaration
@Injectable({ providedIn: 'root' }) export class TopicService extends RedHerdApi { constructor( protected http: HttpClient, protected notifier: NotificationsService ) { super(RedHerdRootEndpoint.topics, http, notifier); } /** GET: retrieve processes from server */ public getTopics(): Observ...
dor0n/redherd-framework
herd-view/src/app/services/topic.service.ts
TypeScript
MethodDeclaration
/** GET: retrieve processes from server */ public getTopics(): Observable<Topic[]> { return this.getAll(RedHerdEntity.topics); }
dor0n/redherd-framework
herd-view/src/app/services/topic.service.ts
TypeScript
MethodDeclaration
/** GET: retrieve topic by id */ public getTopic(id: number): Observable<Topic> { return this.get(RedHerdEntity.topic, id); }
dor0n/redherd-framework
herd-view/src/app/services/topic.service.ts
TypeScript
MethodDeclaration
/** POST: add new topic to server */ public addTopic(topic: Topic): Observable<boolean> { // Preliminary data normalization // NOTE: the id property must be omitted in the add function topic.id = null; return this.add(topic); }
dor0n/redherd-framework
herd-view/src/app/services/topic.service.ts
TypeScript
MethodDeclaration
/** DELETE: delete topic from server */ public deleteTopic(topic: Topic | number): Observable<boolean> { // Preliminary data normalization // NOTE: the base class needs a numeric parameter const id = typeof topic === 'number' ? topic : topic.id; return this.delete(id); }
dor0n/redherd-framework
herd-view/src/app/services/topic.service.ts
TypeScript
MethodDeclaration
/** PUT: update topic on server */ public updateTopic(topic: Topic): Observable<boolean> { return this.update(topic); }
dor0n/redherd-framework
herd-view/src/app/services/topic.service.ts
TypeScript
FunctionDeclaration
function sortData(data: IRow[], column: Column, direction: Direction): IRow[] { return data.concat().sort((a, b) => { const adjustResponseOnDirection = (resp: number): number => { return (direction === Direction.ASC) ? resp: -resp; }; if (column === Column.NAME) { return adjustResponseOnDirec...
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
ArrowFunction
(r: IRow): JSX.Element => ( <Table.Row key={r.name}> <Table.Cell>{r.name}</Table.Cell> <Table.Cell>{r.decreased}</Table.Cell> <Table.Cell>{r.same}</Table.Cell> <Table.Cell>{r.increased}</Table.Cell> </Table.Row>
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
ArrowFunction
(a, b) => { const adjustResponseOnDirection = (resp: number): number => { return (direction === Direction.ASC) ? resp: -resp; }; if (column === Column.NAME) { return adjustResponseOnDirection(a.name.toLowerCase().localeCompare(b.name.toLowerCase())); } let aVal: number|undefined, bVal: ...
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
ArrowFunction
(resp: number): number => { return (direction === Direction.ASC) ? resp: -resp; }
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
ArrowFunction
(p: IProp): IRow[] => { const data = extractDeltas(p.category, p.report, p.questionSet); return data.map((d) => ({ name: d.label, increased: d.increased, decreased: d.decreased, same: d.same, })); }
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
ArrowFunction
(d) => ({ name: d.label, increased: d.increased, decreased: d.decreased, same: d.same, })
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
ArrowFunction
() => { if (column !== this.state.column) { return this.setState({ column, data: sortData(this.state.data, column, Direction.ASC), direction: Direction.ASC, }); } const newDir = (this.state.direction === Direction.ASC) ? Direction.DESC : Direction.ASC; ...
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
ClassDeclaration
export class DeltaTable extends React.Component<IProp, IState> { constructor(props: IProp) { super(props); this.state = { column: Column.NAME, direction: Direction.ASC, data: getRows(props), }; this.handleSort = this.handleSort.bind(this); } public componentWillReceiveProps(ne...
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
InterfaceDeclaration
interface IProp { report: IBeneficiaryDeltaReport; questionSet: IOutcomeSet; category?: boolean; }
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
InterfaceDeclaration
interface IState { column: Column; direction: Direction; data: IRow[]; }
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
InterfaceDeclaration
interface IRow { name: string; decreased: number; same: number; increased: number; }
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
EnumDeclaration
enum Column { NAME, DEC, INC, SAME, }
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
MethodDeclaration
public componentWillReceiveProps(nextProps: IProp) { const newRows = getRows(nextProps); this.setState({ column: this.state.column, data: sortData(newRows, this.state.column, this.state.direction), direction: this.state.direction, }); }
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
MethodDeclaration
private handleSort(column: Column): () => void { return () => { if (column !== this.state.column) { return this.setState({ column, data: sortData(this.state.data, column, Direction.ASC), direction: Direction.ASC, }); } const newDir = (this.state.direc...
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
MethodDeclaration
public render() { const rows = this.state.data; const nameCol = this.props.category ? 'Category' : 'Question'; return ( <Table striped={true} celled={true} sortable={true}> <Table.Header> <Table.Row> <Table.HeaderCell sorted={this.state.column === Column.NAME ? direction...
themakshter/app
src/app/components/DeltaReport/table.tsx
TypeScript
ClassDeclaration
export class Remove extends Base { Query: IDelete; RowAffected: number = 0; private remove = function () { var That = this, removeData = function (column, value) { var CursorOpenRequest = That.ObjectStore.index(column).ope...
ujjwalguptaofficial/legendary-rotary-phone
Script/Business/RemoveLogic.ts
TypeScript
ArrowFunction
(photo) => {return photo.pictureURL}
depstein/storytelling_public
src/models/chapter-data.ts
TypeScript
ArrowFunction
(photo) => { this._timestamp = moment.max(this.timestamp, photo.timestamp); }
depstein/storytelling_public
src/models/chapter-data.ts
TypeScript