type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
() => { openEventsViewerFieldsBrowser(); cy.get(FIELDS_BROWSER_SELECTED_CATEGORY_TITLE) .invoke('text') .should('eq', 'default ECS'); }
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
() => { openEventsViewerFieldsBrowser(); defaultHeadersInDefaultEcsCategory.forEach(header => cy.get(`[data-test-subj="field-${header.id}-checkbox"]`).should('be.checked') ); }
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
header => cy.get(`[data-test-subj="field-${header.id}-checkbox"]`).should('be.checked')
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
() => { const toggleField = 'message'; cy.get(`${EVENTS_VIEWER_PANEL} [data-test-subj="header-text-${toggleField}"]`).should('exist'); openEventsViewerFieldsBrowser(); cy.get(`${EVENTS_VIEWER_PANEL} [data-test-subj="field-${toggleField}-checkbox"]`).uncheck({ force: true, }); clickOut...
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
() => { const filterInput = '4bf34c1c-eaa9-46de-8921-67a4ccc49829'; // this will never match real data cy.get(HEADER_SUBTITLE) .invoke('text') .then(text1 => { cy.get(HEADER_SUBTITLE) .invoke('text', { timeout: DEFAULT_TIMEOUT }) .should('not.equal', 'Showing: 0 events'...
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
text1 => { cy.get(HEADER_SUBTITLE) .invoke('text', { timeout: DEFAULT_TIMEOUT }) .should('not.equal', 'Showing: 0 events'); filterSearchBar(filterInput); cy.get(HEADER_SUBTITLE) .invoke('text') .should(text2 => { expect(text1).not.to.eq(text...
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
text2 => { expect(text1).not.to.eq(text2); }
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
() => { const filterInput = 'host.geo.c'; const toggleField = 'host.geo.city_name'; openEventsViewerFieldsBrowser(); filterFieldsBrowser(filterInput); cy.get(`${EVENTS_VIEWER_PANEL} [data-test-subj="header-text-${toggleField}"]`).should( 'not.exist' ); cy.get(`${EVENTS_VIEWER_PANE...
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
() => { cy.get(LOCAL_EVENTS_COUNT, { timeout: DEFAULT_TIMEOUT }) .invoke('text') .then(text1 => { cy.get(LOCAL_EVENTS_COUNT) .invoke('text') .should('equal', '25'); cy.get(LOAD_MORE).click({ force: true }); cy.get(LOCAL_EVENTS_COUNT) .invoke('text...
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
text1 => { cy.get(LOCAL_EVENTS_COUNT) .invoke('text') .should('equal', '25'); cy.get(LOAD_MORE).click({ force: true }); cy.get(LOCAL_EVENTS_COUNT) .invoke('text') .should(text2 => { expect(text1).not.to.eq(text2); }); }
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
() => { // wait for data to load cy.get(SERVER_SIDE_EVENT_COUNT, { timeout: DEFAULT_TIMEOUT }) .should('exist') .invoke('text', { timeout: DEFAULT_TIMEOUT }) .should('not.equal', '0'); cy.get(INSPECT_QUERY, { timeout: DEFAULT_TIMEOUT }) .should('exist') .trigger('mousemove', ...
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
() => { const filterInput = 'host.geo.c'; const toggleField = 'host.geo.city_name'; openEventsViewerFieldsBrowser(); filterFieldsBrowser(filterInput); cy.get(`${EVENTS_VIEWER_PANEL} [data-test-subj="header-text-${toggleField}"]`).should( 'not.exist' ); cy.get(`${EVENTS_VIEWER_PANE...
trengrj/kibana
x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/events_viewer/events_viewer.spec.ts
TypeScript
ArrowFunction
() => { let service: GuestsService; beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ providers: [GuestsService], }).compile(); service = module.get<GuestsService>(GuestsService); }); it('should be defined', () => { expect(service).toBeDefined(); ...
WilsonLawler/react-nest-admin
src/guests/guests.service.spec.ts
TypeScript
ArrowFunction
async () => { const module: TestingModule = await Test.createTestingModule({ providers: [GuestsService], }).compile(); service = module.get<GuestsService>(GuestsService); }
WilsonLawler/react-nest-admin
src/guests/guests.service.spec.ts
TypeScript
ArrowFunction
key => { if (key.includes('date') || key.includes('created_at')) { let value = response.features[0].properties[key]; if (value && value[value.length - 1] === 'Z') { value = value.substring(0, value.length - 1); response.features[0].properties[key]...
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
ArrowFunction
result => { if (result == true) { this.close(); } }
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
ArrowFunction
(res: any) => { const file = new Blob([res], { type: res.type }); const blob = window.URL.createObjectURL(file); const link = document.createElement('a'); link.href = blob; link.download = `${outputFilename}`; link.click(); window.URL.revokeObjectURL(blob); ...
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
ArrowFunction
result => { if (result === true) { this.close(); } }
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-feature-info', templateUrl: './feature-info.component.html', styleUrls: ['./feature-info.component.scss'], }) export class FeatureInfoComponent implements OnInit { public latlongTxt: any; public layersData: any; public featureId; public splitPolygon: any; panelOpenState = f...
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
async getFeaturesInfo() { const point = this.map.latLngToContainerPoint(this.latlong); const size = this.map.getSize(); try { const overlayers = this.ls.getOverlayers(); // get infos Feature by layer (From all Layers) for (let i = overlayers.length - 1; i > -1; i--) { const layer...
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
showDeleteFeature(featureId: any) { const delFeature = this.dialog.open(DelFeatureComponent, { width: '400px', height: '200px', data: { featureId } }); delFeature.afterClosed().subscribe(result => { if (result == true) { this.close(); } ...
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
zoomToFeature(geom: any) { const layer = new L.GeoJSON(geom); const ll = layer.getBounds(); this.map.fitBounds(ll); }
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
showSplitFeature(featureData: any) { this.zoomToFeature(featureData.geom); this.enableSplitEditing(featureData.geom, featureData.featureId); const dialogPosition = {left: `10px`}; this.dialogRef.updatePosition(dialogPosition); }
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
/** get shapefile */ getShapefileById(layerId: any, featureKey: any, featureId: any) { const cql_filter = `${featureKey}=${featureId}`; const outputFilename = `${layerId}-${featureId}.zip`; const url = this.ls.getFeaturesDownloadURL(layerId, outputFilename, cql_filter); this.ls.getShapefileById(url).s...
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
showEditFeature(featureId: any, isSplit: boolean, splitGeom: any, sourceGeom: any = null) { const editFeature = this.dialog.open(EditBoxFormComponent, { width: '360px', height: '320px', data: { featureId, isSplit, splitGeom, sourceGeom }...
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
copyCoordinatesToClipboard(inputElement) { inputElement.select(); document.execCommand('copy'); inputElement.setSelectionRange(0, 0); this.snackBar.open('Coordinates copied to the clipboard!!', '', { duration: 3000, verticalPosition: 'top', horizontalPosition: 'center', panelCla...
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
close() { this.dialogRef.close(); }
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
public enableSplitEditing(originalGeoJSON: any, featureId: any) { if (!this.splitPolygon) { this.splitPolygon = new L.Draw.Polygon(this.map, this.drawControl.options.polygon); this.splitPolygon.enable(); splitFeatureId = featureId; this.map.on(L.Draw.Event.CREATED, function(e) { ...
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
public showSplitEditFeature(layerData: any) { const featureId = layerData.featureId; const sourceGeom = layerData.geom; this.showEditFeature(featureId, true, splitGeometry, sourceGeom); }
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
MethodDeclaration
public disableSplitEditing() { if (this.splitPolygon) { this.map.off(L.Draw.Event.CREATED); this.splitPolygon.disable(); this.splitPolygon = null; } }
brazil-data-cube/forest-monitor-app
forest-monitor-app/src/app/pages/explore/map/feature-info/feature-info.component.ts
TypeScript
ArrowFunction
async () => await fs.remove(dataPath)
Palem1988/sfdx-core
src/org.ts
TypeScript
ArrowFunction
username => { if (username === thisUsername) { return AuthInfo.create({ username: this.getConnection().getUsername() }); } else { return AuthInfo.create({ username: ensureString(username) }); } }
Palem1988/sfdx-core
src/org.ts
TypeScript
ArrowFunction
username => username !== targetUser
Palem1988/sfdx-core
src/org.ts
TypeScript
ArrowFunction
(map, key) => { map[key] = this.getField(key); return map; }
Palem1988/sfdx-core
src/org.ts
TypeScript
ArrowFunction
e => { if (throwWhenRemoveFails) { throw e; } else { this.logger.warn(`failed to read directory ${dirPath}`); return; } }
Palem1988/sfdx-core
src/org.ts
TypeScript
ArrowFunction
async () => await sandboxOrgConfig.unlink()
Palem1988/sfdx-core
src/org.ts
TypeScript
InterfaceDeclaration
/** * Constructor Options for and Org. */ export interface Options { aliasOrUsername?: string; connection?: Connection; aggregator?: ConfigAggregator; isDevHub?: boolean; }
Palem1988/sfdx-core
src/org.ts
TypeScript
EnumDeclaration
/** * Scratch Org status. */ export enum Status { /** * The scratch org is active. */ ACTIVE = 'ACTIVE', /** * The scratch org has expired. */ EXPIRED = 'EXPIRED', /** * The org is a scratch Org but no dev hub is indicated. */ UNKNOWN = 'UNKNOWN', /** ...
Palem1988/sfdx-core
src/org.ts
TypeScript
EnumDeclaration
/** * Org Fields. */ // A subset of fields from AuthInfoFields and properties that are specific to Org, // and properties that are defined on Org itself. export enum Fields { /** * The org alias. */ // From AuthInfo ALIAS = 'alias', CREATED = 'created', /** * The Salesforce inst...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Clean all data files in the org's data path. Usually <workspace>/.sfdx/orgs/<username>. * @param orgDataPath A relative path other than "orgs/". * @param throwWhenRemoveFails Should the remove org operations throw an error on failure? */ public async cleanLocalOrgData(orgDataPath?: string, throwWhenRe...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * @ignore */ public async retrieveOrgUsersConfig(): Promise<OrgUsersConfig> { return await OrgUsersConfig.create(OrgUsersConfig.getOptions(this.getOrgId())); }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Removes the scratch org config file at $HOME/.sfdx/[name].json, any project level org * files, all user auth files for the org, matching default config settings, and any * matching aliases. * @param throwWhenRemoveFails Determines if the call should throw an error or fail silently. */ public async ...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Check that this org is a scratch org by asking the dev hub if it knows about it. * * **Throws** *{@link SfdxError}{ name: 'NotADevHub' }* Not a Dev Hub. * * **Throws** *{@link SfdxError}{ name: 'NoResults' }* No results. * * @param devHubUsername The username of the dev hub org. */ public ...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns the Org object or null if this org is not affiliated with a Dev Hub (according to the local config). */ public async getDevHubOrg(): Promise<Optional<Org>> { if (this.isDevHubOrg()) { return this; } else if (this.getField(Org.Fields.DEV_HUB_USERNAME)) { const devHubUsername = ens...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns `true` if the org is a Dev Hub. * * **Note** This relies on a cached value in the auth file. If that property * is not cached, this method will **always return false even if the org is a * dev hub**. If you need accuracy, use the {@link Org.determineIfDevHubOrg} method. */ public isDevHu...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns `true` if the org is a Dev Hub. * * Use a cached value. If the cached value is not set, then check access to the * ScratchOrgInfo object to determine if the org is a dev hub. * * @param forceServerCheck Ignore the cached value and go straight to the server * which will be required if ...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Refreshes the auth for this org's instance by calling HTTP GET on the baseUrl of the connection object. */ public async refreshAuth(): Promise<void> { this.logger.debug('Refreshing auth for org.'); const requestInfo = { url: this.getConnection().baseUrl(), method: 'GET' }; const ...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Reads and returns the content of all user auth files for this org as an array. */ public async readUserAuthFiles(): Promise<AuthInfo[]> { const config: OrgUsersConfig = await this.retrieveOrgUsersConfig(); const contents: ConfigContents = await config.read(); const thisUsername = ensure(this.ge...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Adds a username to the user config for this org. For convenience `this` object is returned. * * ``` * const org: Org = await Org.create({ * connection: await Connection.create({ * authInfo: await AuthInfo.create('foo@example.com') * }) * }); * const userAuth: AuthInfo = await Au...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Removes a username from the user config for this object. For convenience `this` object is returned. * * **Throws** *{@link SfdxError}{ name: 'MissingAuthInfo' }* Auth info is missing. * * @param {AuthInfo | string} auth The AuthInfo containing the username to remove. */ public async removeUserna...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Sets the key/value pair in the sandbox config for this org. For convenience `this` object is returned. * * * @param {key} The key for this value * @param {value} The value to save */ public async setSandboxOrgConfigField(field: SandboxOrgConfig.Fields, value: string): Promise<Org> { const sa...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns an org config field. Returns undefined if the field is not set or invalid. */ public async getSandboxOrgConfigField(field: SandboxOrgConfig.Fields) { const sandboxOrgConfig = await this.retrieveSandboxOrgConfig(); return sandboxOrgConfig.get(field); }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Retrieves the highest api version that is supported by the target server instance. If the apiVersion configured for * Sfdx is greater than the one returned in this call an api version mismatch occurs. In the case of the CLI that * results in a warning. */ public async retrieveMaxApiVersion(): Promise<...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns the admin username used to create the org. */ public getUsername(): Optional<string> { return this.getConnection().getUsername(); }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns the orgId for this org. */ public getOrgId(): string { return this.getField(Org.Fields.ORG_ID) as string; }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns for the config aggregator. */ public getConfigAggregator(): ConfigAggregator { return this.configAggregator; }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns an org field. Returns undefined if the field is not set or invalid. */ public getField(key: Org.Fields): AnyJson { // @ts-ignore TODO: Need to refactor storage of these values on both Org and AuthFields return this[key] || this.getConnection().getAuthInfoFields()[key]; }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns a map of requested fields. */ public getFields(keys: Org.Fields[]): JsonMap { const json: JsonMap = {}; return keys.reduce((map, key) => { map[key] = this.getField(key); return map; }, json); }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns the JSForce connection for the org. */ public getConnection(): Connection { return this.connection; }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Initialize async components. */ protected async init(): Promise<void> { this.logger = await Logger.child('Org'); this.configAggregator = this.options.aggregator ? this.options.aggregator : await ConfigAggregator.create(); if (!this.options.connection) { if (this.options.aliasOrUsername =...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * **Throws** *{@link SfdxError} Throws and unsupported error. */ protected getDefaultOptions(): Org.Options { throw new SfdxError('Not Supported'); }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Returns a promise to delete an auth info file from the local file system and any related cache information for * this Org.. You don't want to call this method directly. Instead consider calling Org.remove() */ private async removeAuth(): Promise<void> { const username = ensure(this.getUsername()); ...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Deletes the users config file */ private async removeUsersConfig() { const config = await this.retrieveOrgUsersConfig(); if (await config.exists()) { this.logger.debug(`Removing org users config at: ${config.getPath()}`); await config.unlink(); } }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * @ignore */ private async retrieveSandboxOrgConfig(): Promise<SandboxOrgConfig> { return await SandboxOrgConfig.create(SandboxOrgConfig.getOptions(this.getOrgId())); }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
private manageDelete(cb: AnyFunction<Promise<void>>, dirPath: string, throwWhenRemoveFails: boolean): Promise<void> { return cb().catch(e => { if (throwWhenRemoveFails) { throw e; } else { this.logger.warn(`failed to read directory ${dirPath}`); return; } }); }
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Remove the org users auth file. * @param throwWhenRemoveFails true if manageDelete should throw or not if the deleted fails. */ private async removeUsers(throwWhenRemoveFails: boolean) { this.logger.debug(`Removing users associate with org: ${this.getOrgId()}`); const config = await this.retrieve...
Palem1988/sfdx-core
src/org.ts
TypeScript
MethodDeclaration
/** * Remove an associate sandbox config. * @param throwWhenRemoveFails true if manageDelete should throw or not if the deleted fails. */ private async removeSandboxConfig(throwWhenRemoveFails: boolean) { const sandboxOrgConfig = await this.retrieveSandboxOrgConfig(); if (await sandboxOrgConfig.exists(...
Palem1988/sfdx-core
src/org.ts
TypeScript
ArrowFunction
() => import('/@/pages/About.vue')
twincats/manga-electron
packages/renderer/src/router.ts
TypeScript
FunctionDeclaration
async function main() { await bench({ name: "int8 array", lastField: (msg) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access void (msg as any).arr[99999]; }, msgDef: `int8[] arr`, msg: { arr: new Int8Array(100000).fil...
foxglove/rosmsg-serialization
bench/index.ts
TypeScript
ArrowFunction
(msg) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access void (msg as any).arr[99999]; }
foxglove/rosmsg-serialization
bench/index.ts
TypeScript
ArrowFunction
(msg) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access void (msg as any).frame_id; }
foxglove/rosmsg-serialization
bench/index.ts
TypeScript
ArrowFunction
(msg) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access void (msg as any).is_dense; }
foxglove/rosmsg-serialization
bench/index.ts
TypeScript
ArrowFunction
(msg) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access void (msg as any).status[19].values[19].value; }
foxglove/rosmsg-serialization
bench/index.ts
TypeScript
ArrowFunction
() => { let component: DropdownPresentorComponent; let fixture: ComponentFixture<DropdownPresentorComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ DropdownPresentorComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.creat...
Domon-Casle/AngularLunchAndLearn
src/app/components/dropdown-presentor/dropdown-presentor.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [ DropdownPresentorComponent ] }) .compileComponents(); }
Domon-Casle/AngularLunchAndLearn
src/app/components/dropdown-presentor/dropdown-presentor.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(DropdownPresentorComponent); component = fixture.componentInstance; fixture.detectChanges(); }
Domon-Casle/AngularLunchAndLearn
src/app/components/dropdown-presentor/dropdown-presentor.component.spec.ts
TypeScript
ClassDeclaration
@Injectable() export class SiteDefinitionController extends BaseController<ISiteDefinitionDocument> { constructor(siteDefinitionService: SiteDefinitionService) { super(siteDefinitionService) } }
GuilhermeHdAS/angular-cms
cms-api/src/modules/site-definition/site-definition.controller.ts
TypeScript
ArrowFunction
leagues => { this.leagues = leagues; }
1001hz/polr
src/app/loggedin/home/league-list.component.ts
TypeScript
ClassDeclaration
@Component( { template: ` <h2>Leagues</h2> <ul> <li *ngFor="let league of leagues"> <a routerLink="./league/{{league._id}}" routerLinkActive="active" [routerLinkActiveOptions]= "{exact: true}"> {{ league.name }} </a> </li> </ul> `, selector: '<l...
1001hz/polr
src/app/loggedin/home/league-list.component.ts
TypeScript
MethodDeclaration
install(Vue) { Vue.component('LazyYoutubeVideo', VueLazyYoutubeVideo) }
parsher/vue-lazy-youtube-video
src/index.ts
TypeScript
ClassDeclaration
export class WebDeployUtility { public static async publishUsingWebDeploy(taskParameters: TaskParameters, webDeployArguments: WebDeployArguments, azureAppServiceUtility: AzureAppServiceUtility) { var retryCountParam = tl.getVariable("appservice.msdeployretrycount"); var retryCount = (retryCountPara...
50Wliu/azure-pipelines-tasks
Tasks/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts
TypeScript
MethodDeclaration
public static async publishUsingWebDeploy(taskParameters: TaskParameters, webDeployArguments: WebDeployArguments, azureAppServiceUtility: AzureAppServiceUtility) { var retryCountParam = tl.getVariable("appservice.msdeployretrycount"); var retryCount = (retryCountParam && !(isNaN(Number(retryCountParam)...
50Wliu/azure-pipelines-tasks
Tasks/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts
TypeScript
MethodDeclaration
public static constructWebDeployArguments(taskParameters: TaskParameters, publishProfile: any): WebDeployArguments { let webDeployArguments: any = {}; webDeployArguments.package = taskParameters.Package; webDeployArguments.additionalArguments = taskParameters.AdditionalArguments; webDep...
50Wliu/azure-pipelines-tasks
Tasks/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts
TypeScript
MethodDeclaration
public static async webDeployRecommendationForIssue(taskParameters: TaskParameters, errorCode: string, azureAppServiceUtility: AzureAppServiceUtility, isRecommendation: boolean) { switch(errorCode) { case 'ERROR_CONNECTION_TERMINATED': { if(!isRecommendation) { a...
50Wliu/azure-pipelines-tasks
Tasks/AzureRmWebAppDeploymentV4/operations/WebDeployUtility.ts
TypeScript
FunctionDeclaration
export default function CustomizedTables() { const classes = useStyles(); return ( <TableContainer> <Table className={classes.table} aria-label="customized table"> <TableHead style={{ background: "linear-gradient(270.8deg, #C94CA8 8.38%, #2C84F9 96.25%)", }} > <TableRow> ...
chaoscarnival/chaoscarnival.github.io
app/client/src/pages/SponsorshipPage/TableContent/index.tsx
TypeScript
ArrowFunction
(theme: Theme) => createStyles({ root: { borderBottom: "none", }, head: { fontSize: "26px", color: theme.palette.common.white, }, body: { color: theme.palette.common.white, borderRadius: 4, fontSize: 18, }, footer: { fontSize: "20px", color: theme.palette.common.white, }, })
chaoscarnival/chaoscarnival.github.io
app/client/src/pages/SponsorshipPage/TableContent/index.tsx
TypeScript
ArrowFunction
(text: string) => { const value = text.split(","); const val = value[0]; const valText = value[1]; return ( <div> {val === "Yes" ? ( <img src="/icons/tick.svg" alt="Yes" style={{ width: 26, height: 26 }}
chaoscarnival/chaoscarnival.github.io
app/client/src/pages/SponsorshipPage/TableContent/index.tsx
TypeScript
ArrowFunction
(row) => ( <TableRow hover
chaoscarnival/chaoscarnival.github.io
app/client/src/pages/SponsorshipPage/TableContent/index.tsx
TypeScript
MethodDeclaration
textFormatter(row
chaoscarnival/chaoscarnival.github.io
app/client/src/pages/SponsorshipPage/TableContent/index.tsx
TypeScript
FunctionDeclaration
export async function loadTransactionList({ serviceName, start, end, uiFilters, transactionType }: { serviceName: string; start: string; end: string; transactionType: string; uiFilters: UIFilters; }) { return await callApi<TransactionListAPIResponse>({ pathname: `/api/apm/services/${serviceNa...
DanishMirrani/kibana
x-pack/legacy/plugins/apm/public/services/rest/apm/transaction_groups.ts
TypeScript
FunctionDeclaration
export async function loadTransactionDistribution({ serviceName, start, end, transactionName, transactionType, transactionId, traceId, uiFilters }: { serviceName: string; start: string; end: string; transactionType: string; transactionName: string; transactionId?: string; traceId?: string...
DanishMirrani/kibana
x-pack/legacy/plugins/apm/public/services/rest/apm/transaction_groups.ts
TypeScript
FunctionDeclaration
export async function loadTransactionCharts({ serviceName, start, end, uiFilters, transactionType, transactionName }: { serviceName: string; start: string; end: string; transactionType?: string; transactionName?: string; uiFilters: UIFilters; }) { return callApi<TimeSeriesAPIResponse>({ p...
DanishMirrani/kibana
x-pack/legacy/plugins/apm/public/services/rest/apm/transaction_groups.ts
TypeScript
FunctionDeclaration
export function hasJSONAPIDocumentForm(body: any) { expect(body['jsonapi']['version']).to.be.equal('1.0'); expect(body['data']).to.exist; }
ryanardo/conversationai-moderator
packages/backend-api/src/test/integration/jsonapi/test_helper.ts
TypeScript
FunctionDeclaration
export function isFullModel(model: any, resource: any, attrFields?: Array<string>, relFields?: Array<string>) { const keyLength = 4 + (model.include ? 1 : 0); expect(Object.keys(resource)).to.be.lengthOf(keyLength); let expectedAttributesLength = model.numberOfKeys; if (attrFields) { expectedAttributesLe...
ryanardo/conversationai-moderator
packages/backend-api/src/test/integration/jsonapi/test_helper.ts
TypeScript
FunctionDeclaration
export function isIdentifier(resource: any) { const keys = Object.keys(resource); expect(keys).to.be.lengthOf(2); expect(resource['id']).to.exist; expect(resource['type']).to.exist; }
ryanardo/conversationai-moderator
packages/backend-api/src/test/integration/jsonapi/test_helper.ts
TypeScript
FunctionDeclaration
function getNormaliser(attr: string): (val: string) => any { if (attr === 'sourceCreatedAt') { return (val: string) => Date.parse(val); } return (val: string) => Number(val); }
ryanardo/conversationai-moderator
packages/backend-api/src/test/integration/jsonapi/test_helper.ts
TypeScript
FunctionDeclaration
function basicSingleModel(res: any, ofModel: string) { expect(res).to.have.status(200); expect(res).to.be.json; // Has standard info. hasJSONAPIDocumentForm(res.body); expect(res.body['data']).to.be.an('object'); expect(res.body['data']['type']).to.be.equal(ofModel); isFullModel(models[o...
ryanardo/conversationai-moderator
packages/backend-api/src/test/integration/jsonapi/test_helper.ts
TypeScript
FunctionDeclaration
function basicModelList(res: any, ofModel: string, attrFields?: Array<string>, relFields?: Array<string>) { expect(res).to.have.status(200); expect(res).to.be.json; // Has standard info. hasJSONAPIDocumentForm(res.body); // In a list of objects expect(res.body['data']).to.be.an('array'); ...
ryanardo/conversationai-moderator
packages/backend-api/src/test/integration/jsonapi/test_helper.ts
TypeScript
FunctionDeclaration
function testIncludesOfType(body: any, include: string) { const listOfModels = Array.isArray(body['data']) ? body['data'] : [body['data']]; const items = listOfModels.reduce((sum: any, m: any) => { const relationData = m['relationships'][include]['data']; if (Array.isArray(relation...
ryanardo/conversationai-moderator
packages/backend-api/src/test/integration/jsonapi/test_helper.ts
TypeScript
FunctionDeclaration
function testAttrFilters(body: any, attrs: Array<string>, values: Array<any>) { body['data'].forEach((r: any) => { attrs.forEach((a, i) => { expect(r['attributes'][a]).to.be.equal(values[i]); }); }); }
ryanardo/conversationai-moderator
packages/backend-api/src/test/integration/jsonapi/test_helper.ts
TypeScript