type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
MethodDeclaration
ngOnInit() { this.show(this._route.snapshot.params['id']) }
guaracyalima/webapp_bseg
src/app/bseg/insurances/auto/auto-show/auto-show.component.ts
TypeScript
MethodDeclaration
public show(id: number) { this._db.show(id) .subscribe(success => { this.auto = success, this.client = success.client this.coverage = success.coverage }, error => console.error('Error to find auto insurance', error)) }
guaracyalima/webapp_bseg
src/app/bseg/insurances/auto/auto-show/auto-show.component.ts
TypeScript
ClassDeclaration
export class QueryInfo { info?: any; progress: number; status: QueryState; totalNumTasks?: number; totalNumCompletedTasks?: number; numActiveTasks?: number; numCompletedCurrentStageTasks?: number; dag?: string; constructor(state: QueryStateEnum = QueryStateEnum.WAITING) { this.progress = 0; ...
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
MethodDeclaration
submit(info: Partial<QueryInfo>) { if (this.status.submit()) { this.assign(info); return true; } return false; }
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
MethodDeclaration
onWaiting(info: Partial<QueryInfo>) { if (this.status.onWaiting()) { this.assign(info); return true; } return false; }
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
MethodDeclaration
onRun(info: Partial<QueryInfo>) { if (this.status.onRun()) { this.assign(info); return true; } return false; }
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
MethodDeclaration
onProgress(info: Partial<QueryInfo>) { if (this.status.onProgress()) { this.assign(info); return true; } return false; }
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
MethodDeclaration
onCancel(info: Partial<QueryInfo>) { if (this.status.onCancel()) { this.assign(info); return true; } return false; }
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
MethodDeclaration
onError(info: Partial<QueryInfo>) { if (this.status.onError()) { this.assign(info); return true; } return false; }
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
MethodDeclaration
onSuccess(info: Partial<QueryInfo>) { if (this.status.onSuccess()) { this.assign(info); return true; } return false; }
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
MethodDeclaration
toString() { return this.status.toString(); }
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
MethodDeclaration
valueOf() { return this.status.valueOf(); }
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
MethodDeclaration
private assign(info: Partial<QueryInfo>) { Object.assign(this, _.omit(info, ['status'])); }
anruky/Zeta
zds-web/src/types/workspace/notebook-job/query/query-info.ts
TypeScript
FunctionDeclaration
function parser_cut_or_tape_box(parser: CommandParser): cut_or_tape_bindings { let operation: EdgeOpWord = <EdgeOpWord>parser.get_match('command').match; let dir: Token | false; if (parser.is_done()) { dir = 'horizontally'; } else { dir = parser.consume_option(edge_dir_word_tokens); ...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
FunctionDeclaration
function cut_or_tape_box(world: SingleBoxWorld, parser: CommandParser): CommandResult<SingleBoxWorld> { //operation: EdgeOpWord, face_w: FaceWord, dir: EdgeDirWord, start_pos_a: PositionWord, start_pos_b: PositionWord, end_pos_b: PositionWord): CommandResult { //let inner_this = this; return with_world_upd...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
FunctionDeclaration
function open_or_close_dangle(world: SingleBoxWorld, parser: CommandParser): CommandResult<SingleBoxWorld> { // operation: DangleOpWord, face_w: FaceWord) return with_world_update(function (effects) { let operation = <DangleOpWord>parser.get_match('command').match; let face_w = parser.consume_o...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
FunctionDeclaration
function remove_or_replace_rend(world: SingleBoxWorld, parser: CommandParser): CommandResult<SingleBoxWorld> { //operation: RendOpWord, face_w: FaceWord): CommandResult { return with_world_update(function (effects) { let operation = <RendOpWord>parser.get_match('command').match; let face_w = pa...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
FunctionDeclaration
export function test() { let contents: Item[] = [new Codex(), new Pinecone(), new CityKey()]; let world = new SingleBoxWorld({box: new Box({contents: contents})}); console.log('NEW WORLD: test heavy spillage when rolling\n\n\n'); let d = new WorldDriver(world); d.apply_command('lift'); d.appl...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(d) => dangle == d
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(state) => state == RendState.open
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(d) => d !== dir_face && d !== dir_2_opposite.get(dir_face)
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(x) => face_membership.get(x)
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(x, y) => x + y
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(f) => face_membership.get(f) > 0
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(ces) => ces.cardboard == CardboardEdge.intact
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(ces) => ces.tape == TapeEdge.taped
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(i) => i.pre_gestalt()
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(i) => `${i.article()} ${i.name()} - ${i.post_gestalt()}`
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(x, i) => x + i.weight()
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(d) => d.free_face == face
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(d) => d.fixed_face
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
(total, r) => counter_update( total, world.box.box_mesh.get_partition_face_membership(r))
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
InterfaceDeclaration
export interface BoxParams { box_mesh?: BoxMesh, rend_state?: FuckDict<Partition, RendState>, dangle_state?: FuckDict<Dangle, RendState>, edge_state?: FuckDict<Edge, EdgeState>, contents?: Item[] }
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
InterfaceDeclaration
export interface SingleBoxWorldParams { box?: Box, taken_items?: Item[], spilled_items?: Item[] }
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
TypeAliasDeclaration
type cut_or_tape_bindings = {cut_points?: [Point2, Point2][]} & {message?: string};
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
update({box_mesh, rend_state, dangle_state, edge_state, contents}: BoxParams){ if (box_mesh === undefined) { box_mesh = this.box_mesh; } if (rend_state === undefined) { rend_state = this.rend_state; } if (dangle_state === undefined) { dangle...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
default_rend_state(box_mesh: BoxMesh) { let rends = box_mesh.get_free_rends(); let result = new FuckDict<Partition, RendState>(); rends.forEach(function (r) { result.set(r, RendState.closed); }); return result; }
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
default_dangle_state(box_mesh: BoxMesh) { let dangles = box_mesh.get_dangles(); let result = new FuckDict<Dangle, RendState>(); dangles.forEach(function (d) { result.set(d, RendState.closed); }); return result; }
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
open_or_close_rend(operation: RendOperation, rend: Partition) { let box_rends = this.box_mesh.get_rends(); if (!array_fuck_contains(box_rends, rend)){ throw new CommandError('rend does not exist on the box'); } if (this.box_mesh.is_partition_fixed(rend)) { thro...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
open_or_close_dangle(operation: RendOperation, dangle: Dangle) { if (this.box_mesh.is_partition_fixed(dangle.partition)) { throw new WorldUpdateError('cannot open or close a fixed dangle'); } let box_dangles = this.box_mesh.get_dangles(); if (box_dangles.some((d) => dangle...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
rotate_y(degrees: number) { let new_box_mesh = this.box_mesh.rotate_y(degrees); return this.update({box_mesh: new_box_mesh}); }
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
roll(direction: Direction) { if (this.dangle_state.values_array().some((state) => state == RendState.open)) { throw new WorldUpdateError('cannot roll a box with open dangles'); } let new_box_mesh = this.box_mesh.roll(direction); let dir_face: Face = direction_2_face.get(dir...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
lift() { let effects = world_update.effects; let inner_this = this; let new_contents = this.contents.slice(); let new_rend_state = this.rend_state.copy(); let new_dangle_state = this.dangle_state.copy(); if (new_contents.length > 0) { let test_box_mesh = th...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
cut(face: Face, start: Point2, end: Point2) { return this.cut_or_tape(EdgeOperation.cut, face, start, end); }
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
tape(face: Face, start: Point2, end: Point2) { return this.cut_or_tape(EdgeOperation.tape, face, start, end); }
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
cut_or_tape(operation: EdgeOperation, face: Face, start: Point2, end: Point2) { let effects = world_update.effects; let inner_this = this; if (face !== Face.s && face !== Face.t) { throw new WorldUpdateError('cannot cut or tape sides other than top or front'); } le...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
take_next_item() { let effects = world_update.effects; if (this.contents.length == 0) { throw new WorldUpdateError('cannot take an item from an empty box'); } if (!this.appears_open()) { throw new WorldUpdateError('cannot take an item from a box with no visible...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
next_item() { if (this.contents.length == 0) { return null; } return this.contents[0]; }
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
appears_open() { if (this.rend_state.values_array().some((state) => state == RendState.open)) { return true; } if (this.dangle_state.values_array().some((state) => state == RendState.open)) { return true; } return false; }
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
appears_empty() { return this.appears_open() && this.contents.length == 0; }
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
is_collapsed(){ let open_faces = new Map<Face, number>(); let inner_this = this; this.rend_state.entries_array().forEach(function ([r, state]) { if (state == RendState.open){ let face_membership = inner_this.box_mesh.get_partition_face_membership(r); ...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
update({box, taken_items, spilled_items}: SingleBoxWorldParams) { if (box === undefined) { box = this.box; } if (taken_items === undefined) { taken_items = this.taken_items; } if (spilled_items === undefined) { spilled_items = this.spilled_i...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
get_commands() { let commands: Command<SingleBoxWorld>[] = []; commands.push(rotate_y_box); commands.push(roll_box); commands.push(lift_box); commands.push(cut_box); commands.push(tape_box); commands.push(open_dangle); commands.push(close_dangle); ...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
cut_message(new_box: Box, cut_edge_states: EdgeState[], effects: WorldUpdateEffects) { let cut_message: string; if (cut_edge_states[0].cardboard == CardboardEdge.intact) { cut_message = 'You slide your blade along the cardboard'; if (cut_edge_states[0].tape == TapeEdge.taped) { ...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
tape_message(new_box: Box, cut_edge_states: EdgeState[], effects: WorldUpdateEffects) { let tape_message: string; if (cut_edge_states.some((ces) => ces.cardboard == CardboardEdge.intact)) { tape_message = 'You draw out a length of tape and fasten it to the cardboard.'; } else { ...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
item_spill_message(spilled_items: Item[]){ let si = spilled_items; let during_spill_msg: string; let after_spill_msg: string; if (si.length == 1) { let item_msg = si[0].pre_gestalt(); during_spill_msg = `${capitalize(item_msg)} spills out before you.`; ...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
MethodDeclaration
spill_message(new_box: Box) { let effects = world_update.effects; let structural_dmg_msgs: string[] = []; if (effects.spilled_rends.size > 0) { let total_face_membership = new Map<Face, number>(); effects.spilled_rends.keys_array().forEach(function (sr) { ...
spitz-dan-l/wreck
src/typescript/boxes/world.ts
TypeScript
ArrowFunction
async ({ args, context }) => { const { userID } = context.authorization! const client = await context.pg.connect() const query = pgHelpersQuery(client) try { await query("BEGIN")() const songs = await query(SELECT_PLAYLIST_SONGS)({ parse: pipe( convertTableToCamelCase<Song>(), ...
olyop/musicloud
player/server/src/resolvers/mutation/shuffle-playlist.ts
TypeScript
ArrowFunction
({ songID }, index) => ( query(INSERT_QUEUE_SONG)({ variables: { index, userID, songID, tableName: "queue_laters", }, }) )
olyop/musicloud
player/server/src/resolvers/mutation/shuffle-playlist.ts
TypeScript
ArrowFunction
() => { const network = 'net' const proxyAddress = 'QmeeasCZ9jLbX...ueBJ7d7csxhb' const networkID = 'redT' let validDID before(() => { validDID = tokensFactory.tokens.createDID(network, proxyAddress, networkID) }) it('should get network from valid DID correclty', function () { const parsedNetwo...
validatedid/alastria-identity-lib
test/utils/AidUtils.spec.ts
TypeScript
ArrowFunction
() => { validDID = tokensFactory.tokens.createDID(network, proxyAddress, networkID) }
validatedid/alastria-identity-lib
test/utils/AidUtils.spec.ts
TypeScript
ArrowFunction
(it) => !isEmpty(it)
Cloudxtreme/isolex
src/parser/SplitParser.ts
TypeScript
ClassDeclaration
export class SplitParser extends BaseParser<SplitParserData> implements Parser { protected mapper: ArrayMapper; constructor(options: SplitParserOptions) { super(options, 'isolex#/definitions/service-parser-split'); this.mapper = new ArrayMapper(options.data.dataMapper); } public async parse(msg: Mes...
Cloudxtreme/isolex
src/parser/SplitParser.ts
TypeScript
InterfaceDeclaration
export interface SplitParserData extends ParserData { dataMapper: ArrayMapperOptions; /** * Split every individual character. */ every: boolean; /** * Split options for delimiters, brackets, etc. */ split: SplitString.SplitOptions; }
Cloudxtreme/isolex
src/parser/SplitParser.ts
TypeScript
TypeAliasDeclaration
export type SplitParserOptions = ParserOptions<SplitParserData>;
Cloudxtreme/isolex
src/parser/SplitParser.ts
TypeScript
MethodDeclaration
public async parse(msg: Message): Promise<Array<Command>> { const ctx = mustExist(msg.context); const data = await this.decode(msg); this.logger.debug({ data }, 'splitting string'); return [await this.createCommand(ctx, this.mapper.map(data))]; }
Cloudxtreme/isolex
src/parser/SplitParser.ts
TypeScript
MethodDeclaration
public async decode(msg: Message): Promise<Array<string>> { if (msg.type !== TYPE_TEXT) { throw new MimeTypeError(); } const body = this.matcher.removeMatches(msg.body); return this.split(body).map(trim).filter((it) => !isEmpty(it)); }
Cloudxtreme/isolex
src/parser/SplitParser.ts
TypeScript
MethodDeclaration
public split(msg: string): Array<string> { if (this.data.every) { return msg.split(''); } else { return split(msg, this.data.split); } }
Cloudxtreme/isolex
src/parser/SplitParser.ts
TypeScript
ArrowFunction
async (client) => { client.logger.success(`${client.user.tag} is online!`); }
T3g4nTheCoder/TypeScriptTesting
src/events/Client Events/ReadyEvent.ts
TypeScript
FunctionDeclaration
export function isValidDatemath(value: string): boolean { const parsedValue = dateMath.parse(value); return !!(parsedValue && parsedValue.isValid()); }
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
FunctionDeclaration
export function datemathToEpochMillis(value: string, round: 'down' | 'up' = 'down'): number | null { const parsedValue = dateMath.parse(value, { roundUp: round === 'up' }); if (!parsedValue || !parsedValue.isValid()) { return null; } return parsedValue.valueOf(); }
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
FunctionDeclaration
/** * Extend a datemath value * @param value The value to extend * @param {'before' | 'after'} direction Should the value move before or after in time * @param oppositeEdge For absolute values, the value of the other edge of the range */ export function extendDatemath( value: string, direction: 'before' | 'aft...
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
FunctionDeclaration
function extendRelativeDatemath( value: string, direction: 'before' | 'after' ): DatemathExtension | undefined { const [, operator, amount, unit] = datemathNowExpression.exec(value) || []; if (!operator || !amount || !unit) { return undefined; } const mustIncreaseAmount = (operator === '-' && dire...
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
FunctionDeclaration
function extendAbsoluteDatemath( value: string, direction: 'before' | 'after', oppositeEdge: string ): DatemathExtension | undefined { const valueTimestamp = datemathToEpochMillis(value)!; const oppositeEdgeTimestamp = datemathToEpochMillis(oppositeEdge)!; const actualTimestampDiff = Math.abs(valueTimestam...
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
FunctionDeclaration
function getRatioScale(from: Unit, to?: Unit) { if ((from === 'y' && to === 'w') || (from === 'w' && to === 'y')) { return CONVERSION_RATIOS.wy; } else if (from === 'w' || to === 'w') { return CONVERSION_RATIOS.w; } else if (from === 'M' || to === 'M') { return CONVERSION_RATIOS.M; } else { ret...
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
FunctionDeclaration
export function convertDate(value: number, from: Unit, to: Unit): number { if (from === to) { return value; } const ratioScale = getRatioScale(from, to); const fromIdx = ratioScale.findIndex((ratio) => ratio[0] === from); const toIdx = ratioScale.findIndex((ratio) => ratio[0] === to); let convertedVa...
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
FunctionDeclaration
export function normalizeDate(amount: number, unit: Unit): { amount: number; unit: Unit } { // There is nothing after years if (unit === 'y') { return { amount, unit }; } const nextUnit = dateMath.unitsAsc[dateMath.unitsAsc.indexOf(unit) + 1]; const ratioScale = getRatioScale(unit, nextUnit); const ra...
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
FunctionDeclaration
function isDateInRange(date: string | number): boolean { try { const epoch = typeof date === 'string' ? datemathToEpochMillis(date) ?? -1 : date; return epoch >= 0 && epoch <= JS_MAX_DATE; } catch { return false; } }
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
ArrowFunction
(ratio) => ratio[0] === from
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
ArrowFunction
(ratio) => ratio[0] === to
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
ArrowFunction
(r) => r[0] === unit
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
TypeAliasDeclaration
type DatemathExtension = | { value: string; diffUnit: Unit; diffAmount: number; } | { value: 'now' };
AlexanderWert/kibana
x-pack/plugins/infra/public/utils/datemath.ts
TypeScript
FunctionDeclaration
export function merge<T>( events: Array<Event<T> | Store<T> | Effect<T, any, any>>, ): Event<T> { const result = createEvent(unitObjectName(events, 'merge')) forward({ from: events, to: result, meta: {op: 'merge'}, }) return result }
Kurzdor/effector
src/effector/merge.ts
TypeScript
ClassDeclaration
export class RelayURLService extends NativeURLService implements IURLHandler, IOpener { private urlService: IURLService; constructor( @IMainProcessService mainProcessService: IMainProcessService, @IOpenerService openerService: IOpenerService, @INativeHostService private readonly nativeHostService: INativeHos...
14041980ClaytonChenxiLiew/vscode
src/vs/workbench/services/url/electron-sandbox/urlService.ts
TypeScript
InterfaceDeclaration
export interface IRelayOpenURLOptions extends IOpenURLOptions { openToSide?: boolean; openExternal?: boolean; }
14041980ClaytonChenxiLiew/vscode
src/vs/workbench/services/url/electron-sandbox/urlService.ts
TypeScript
MethodDeclaration
create(options?: Partial<UriComponents>): URI { const uri = super.create(options); let query = uri.query; if (!query) { query = `windowId=${encodeURIComponent(this.nativeHostService.windowId)}`; } else { query += `&windowId=${encodeURIComponent(this.nativeHostService.windowId)}`; } return uri.with(...
14041980ClaytonChenxiLiew/vscode
src/vs/workbench/services/url/electron-sandbox/urlService.ts
TypeScript
MethodDeclaration
async open(resource: URI | string, options?: IRelayOpenURLOptions): Promise<boolean> { if (!matchesScheme(resource, this.productService.urlProtocol)) { return false; } if (typeof resource === 'string') { resource = URI.parse(resource); } return await this.urlService.open(resource, options); }
14041980ClaytonChenxiLiew/vscode
src/vs/workbench/services/url/electron-sandbox/urlService.ts
TypeScript
MethodDeclaration
async handleURL(uri: URI, options?: IOpenURLOptions): Promise<boolean> { const result = await super.open(uri, options); if (result) { await this.nativeHostService.focusWindow({ force: true /* Application may not be active */ }); } return result; }
14041980ClaytonChenxiLiew/vscode
src/vs/workbench/services/url/electron-sandbox/urlService.ts
TypeScript
InterfaceDeclaration
export interface JsonNodeInfoBase { readonly type: NodeType; readonly path: string[]; readonly length?: number; // in case of array, object, string }
dhcode/big-json-viewer
src/parser/json-node-info.ts
TypeScript
InterfaceDeclaration
export interface JsonNodeInfo extends JsonNodeInfoBase { /** * Returns the list of keys in case of an object for the defined range * @param {number} start * @param {number} limit */ getObjectKeys(start?: number, limit?: number): string[]; /** * Return the NodeInfo at the defined position. * Us...
dhcode/big-json-viewer
src/parser/json-node-info.ts
TypeScript
TypeAliasDeclaration
export type NodeType = | 'string' | 'number' | 'array' | 'object' | 'boolean' | 'null' | 'undefined' | string;
dhcode/big-json-viewer
src/parser/json-node-info.ts
TypeScript
ArrowFunction
props => { const id = props.id; const activityItemExamples = [ { key: 1, activityDescription: [ <Link key={1} className={classNames.nameText} onClick={()
jeffreysharris/fluentui
packages/react-examples/src/azure-themes/stories/components/activityitem.stories.tsx
TypeScript
ArrowFunction
(item: { key: string | number }) => ( <ActivityItem {...item}
jeffreysharris/fluentui
packages/react-examples/src/azure-themes/stories/components/activityitem.stories.tsx
TypeScript
InterfaceDeclaration
export interface IActivityItemBasicExample { id?: string; }
jeffreysharris/fluentui
packages/react-examples/src/azure-themes/stories/components/activityitem.stories.tsx
TypeScript
MethodDeclaration
alert('An @mentioned name was clicked.');
jeffreysharris/fluentui
packages/react-examples/src/azure-themes/stories/components/activityitem.stories.tsx
TypeScript
MethodDeclaration
alert('A name was clicked.');
jeffreysharris/fluentui
packages/react-examples/src/azure-themes/stories/components/activityitem.stories.tsx
TypeScript
ArrowFunction
res => { this.photos = res; console.log(this.photos); }
sublimeOne/projects
src/app/photos/photos.component.ts
TypeScript
ClassDeclaration
@Component({ selector: "app-photos", templateUrl: "./photos.component.html", styleUrls: ["./photos.component.css"] }) export class PhotosComponent implements OnInit { photos: any; albumId: any; photo: PhotoData; constructor( private api: ApiService, private route: ActivatedRoute, private spi...
sublimeOne/projects
src/app/photos/photos.component.ts
TypeScript
MethodDeclaration
ngOnInit() { this.loadPhotos(); this.spinner.hide(); }
sublimeOne/projects
src/app/photos/photos.component.ts
TypeScript
MethodDeclaration
loadPhotos() { this.spinner.show(); this.albumId = this.route.snapshot.params.albumId; this.photos = this.api.getImages(this.albumId).subscribe(res => { this.photos = res; console.log(this.photos); }); return this.photos; }
sublimeOne/projects
src/app/photos/photos.component.ts
TypeScript