type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
() => { const files = { app: { 'spec.ts': ` import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-component', template: \`<div class="foo" style="width:100px"...
DaveCheez/angular
packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts
TypeScript
ClassDeclaration
// #endregion @NgModule({ imports: [ CommonModule, FormsModule, RouterModule, ReactiveFormsModule, AlainThemeModule.forChild(), DelonACLModule, DelonFormModule, ...SHARED_DELON_MODULES, ...SHARED_ZORRO_MODULES, // third libs ...THIRDMODULES ], declarations: [ // you...
1312671314/ngTem
src/app/common/shared/shared.module.ts
TypeScript
ArrowFunction
(subscription) => subscription.remove()
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
ArrowFunction
(state) => { // Update UI state (toggle switch, changePace button) this.addEvent('State', new Date(), state); this.zone.run(() => { this.isMoving = state.isMoving; this.enabled = state.enabled; }); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
ArrowFunction
() => { this.isMoving = state.isMoving; this.enabled = state.enabled; }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
ArrowFunction
(location) => { console.log('- getCurrentPosition: ', location); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
ArrowFunction
(error) => { console.warn('- Location error: ', error); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
ArrowFunction
() => { this.events.push({ name: name, timestamp: timestamp, object: event, content: JSON.stringify(event, null, 2) }); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-hello-world', templateUrl: './hello-world.page.html', styleUrls: ['./hello-world.page.scss'], }) export class HelloWorldPage implements OnInit, OnDestroy { // UI State enabled: boolean; isMoving: boolean; // ion-list datasource events: any; subscriptions: any; constru...
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
subscribe(subscription:Subscription) { this.subscriptions.push(subscription); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
unsubscribe() { this.subscriptions.forEach((subscription) => subscription.remove() ); this.subscriptions = []; }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
ngAfterContentInit() { console.log('⚙️ ngAfterContentInit'); this.configureBackgroundGeolocation(); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
ionViewWillEnter() { console.log('⚙️ ionViewWillEnter'); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
ngOnDestroy() { this.unsubscribe(); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
async configureBackgroundGeolocation() { // Step 1: Listen to BackgroundGeolocation events. this.subscribe(BackgroundGeolocation.onEnabledChange(this.onEnabledChange.bind(this))); this.subscribe(BackgroundGeolocation.onLocation(this.onLocation.bind(this))); this.subscribe(BackgroundGeolocation.onMotio...
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
// Return to Home screen (app switcher) onClickHome() { this.navCtrl.navigateBack('/home'); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
// #start / #stop tracking onToggleEnabled() { if (this.enabled) { BackgroundGeolocation.start(); } else { BackgroundGeolocation.stop(); } }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
// Fetch the current position onClickGetCurrentPosition() { BackgroundGeolocation.getCurrentPosition({persist: true}, (location) => { console.log('- getCurrentPosition: ', location); }, (error) => { console.warn('- Location error: ', error); }); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
// Change plugin state between stationary / tracking onClickChangePace() { this.isMoving = !this.isMoving; BackgroundGeolocation.changePace(this.isMoving); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
// Clear the list of events from ion-list onClickClear() { this.events = []; }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// @event enabledchange onEnabledChange(enabled:boolean) { this.isMoving = false; this.addEvent('onEnabledChange', new Date(), {enabled: enabled}); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// @event location onLocation(location:Location) { console.log('[event] location: ', location); this.addEvent('onLocation', new Date(location.timestamp), location); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// @event motionchange onMotionChange(event:MotionChangeEvent) { console.log('[event] motionchange, isMoving: ', event.isMoving, ', location: ', event.location); this.addEvent('onMotionChange', new Date(event.location.timestamp), event); this.isMoving = event.isMoving; }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// @event activitychange onActivityChange(event:MotionActivityEvent) { console.log('[event] activitychange: ', event); this.addEvent('onActivityChange', new Date(), event); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// @event geofence onGeofence(event:GeofenceEvent) { console.log('[event] geofence: ', event); this.addEvent('onGeofence', new Date(event.location.timestamp), event); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// @event http onHttp(response:HttpEvent) { console.log('[event] http: ', response); this.addEvent('onHttp', new Date(), response); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// @event providerchange onProviderChange(provider:ProviderChangeEvent) { console.log('[event] providerchange', provider); this.addEvent('onProviderChange', new Date(), provider); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// @event powersavechange onPowerSaveChange(isPowerSaveEnabled:boolean) { console.log('[event] powersavechange', isPowerSaveEnabled); this.addEvent('onPowerSaveChange', new Date(), {isPowerSaveEnabled: isPowerSaveEnabled}); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// @event connectivitychange onConnectivityChange(event:ConnectivityChangeEvent) { console.log('[event] connectivitychange connected? ', event.connected); this.addEvent('onConnectivityChange', new Date(), event); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// @event authorization onAuthorization(event:AuthorizationEvent) { console.log('[event] authorization: ', event); }
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
MethodDeclaration
/// Add a record to ion-list private addEvent(name, date, event) { const timestamp = date.toLocaleDateString() + ' ' + date.toLocaleTimeString(); this.zone.run(() => { this.events.push({ name: name, timestamp: timestamp, object: event, content: JSON.stringify(event, null, 2...
transistorsoft/capacitor-background-geolocation
example/angular/src/app/hello-world/hello-world.page.ts
TypeScript
FunctionDeclaration
export default function Home(partner: any) { const router = useRouter(); const { locale, defaultLocale } = router; const homeData: any = home; const benefitsData: any = benefits; const partnersData: any = partners; const stepsData: any = steps; const faqData: any = faq; return ( <MainLayout> ...
oleh-domshynskyi/sellcar.online
src/pages/index.tsx
TypeScript
ClassDeclaration
export class AddonEnabledRepositoryImpl implements AddonEnabledRepository { set(on: boolean): void { enabled = on; } get(): boolean { return enabled; } }
aminroosta/vim-vixen
src/content/repositories/AddonEnabledRepository.ts
TypeScript
InterfaceDeclaration
export default interface AddonEnabledRepository { set(on: boolean): void; get(): boolean; }
aminroosta/vim-vixen
src/content/repositories/AddonEnabledRepository.ts
TypeScript
MethodDeclaration
set(on: boolean): void { enabled = on; }
aminroosta/vim-vixen
src/content/repositories/AddonEnabledRepository.ts
TypeScript
MethodDeclaration
get(): boolean { return enabled; }
aminroosta/vim-vixen
src/content/repositories/AddonEnabledRepository.ts
TypeScript
FunctionDeclaration
function initLinkSrv() { const _dashboard: any = { time: { from: 'now-6h', to: 'now' }, getTimezone: jest.fn(() => 'browser'), timeRangeUpdated: () => {}, }; const timeSrv = new TimeSrv({} as any); timeSrv.init(_dashboard); timeSrv.setTime({ from: 'now-1h', to: 'now' }); _das...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => ({ appEvents: { subscribe: () => {}, }, })
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { let linkSrv: LinkSrv; let templateSrv: TemplateSrv; let originalTimeService: TimeSrv; function initLinkSrv() { const _dashboard: any = { time: { from: 'now-6h', to: 'now' }, getTimezone: jest.fn(() => 'browser'), timeRangeUpdated: () => {}, }; const timeSrv = new TimeSrv...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => 'browser'
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { originalTimeService = getTimeSrv(); variableAdapters.register(createQueryVariableAdapter()); }
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { initLinkSrv(); jest.resetAllMocks(); }
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { setTimeSrv(originalTimeService); }
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { describe('built in variables', () => { it('should not trim white space from data links', () => { expect( linkSrv.getDataLinkUIModel( { title: 'White space', url: 'www.google.com?query=some query', }, (v) => v, ...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { it('should not trim white space from data links', () => { expect( linkSrv.getDataLinkUIModel( { title: 'White space', url: 'www.google.com?query=some query', }, (v) => v, {} ).href ).toEqual('w...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { expect( linkSrv.getDataLinkUIModel( { title: 'White space', url: 'www.google.com?query=some query', }, (v) => v, {} ).href ).toEqual('www.google.com?query=some query'); }
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { expect( linkSrv.getDataLinkUIModel( { title: 'New line', url: 'www.google.com?query=some\nquery', }, (v) => v, {} ).href ).toEqual('www.google.com?query=somequery'); }
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { const url = "javascript:alert('broken!);"; it.each` disableSanitizeHtml | expected ${true} | ${url} ${false} | ${'about:blank'} `( "when disable disableSanitizeHtml set to '$disableSanitizeHtml' then result should be '$expected'", ...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
({ disableSanitizeHtml, expected }) => { updateConfig({ disableSanitizeHtml, }); const link = linkSrv.getDataLinkUIModel( { title: 'Any title', url, }, (v) => v, {} ).href; expect...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { it.each` url | appSubUrl | expected ${'/d/XXX'} | ${'/grafana'} | ${'/grafana/d/XXX'} ${'/grafana/d/XXX'} | ${'/grafana'} | ${'/grafana/d/XXX'} ${'d/whatever'} | ${'/grafana'} | ${'d/whatever'} ${'/d/XXX'} | ${''} | $...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
({ url, appSubUrl, expected }) => { locationUtil.initialize({ config: { appSubUrl } as any, getVariablesUrlParams: (() => {}) as any, getTimeRangeForUrl: (() => {}) as any, }); const link = linkSrv.getDataLinkUIModel( { title:...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { it('returns variable values for variable names in link.href and link.tooltip', () => { jest.spyOn(linkSrv, 'getLinkUrl'); jest.spyOn(templateSrv, 'replace'); expect(linkSrv.getLinkUrl).toBeCalledTimes(0); expect(templateSrv.replace).toBeCalledTimes(0); const link = linkSrv.g...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { jest.spyOn(linkSrv, 'getLinkUrl'); jest.spyOn(templateSrv, 'replace'); expect(linkSrv.getLinkUrl).toBeCalledTimes(0); expect(templateSrv.replace).toBeCalledTimes(0); const link = linkSrv.getAnchorInfo({ type: 'link', icon: 'dashboard', tags: [], u...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { it('converts link urls', () => { const linkUrl = linkSrv.getLinkUrl({ url: '/graph', }); const linkUrlWithVar = linkSrv.getLinkUrl({ url: '/graph?home=$home', }); expect(linkUrl).toBe('/graph'); expect(linkUrlWithVar).toBe('/graph?home=127.0.0.1'); }...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { const linkUrl = linkSrv.getLinkUrl({ url: '/graph', }); const linkUrlWithVar = linkSrv.getLinkUrl({ url: '/graph?home=$home', }); expect(linkUrl).toBe('/graph'); expect(linkUrlWithVar).toBe('/graph?home=127.0.0.1'); }
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { const anchorInfoKeepTime = linkSrv.getLinkUrl({ keepTime: true, url: '/graph', }); expect(anchorInfoKeepTime).toBe('/graph?from=now-1h&to=now'); }
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { const anchorInfoIncludeVars = linkSrv.getLinkUrl({ includeVars: true, url: '/graph', }); expect(anchorInfoIncludeVars).toBe('/graph?var-home=127.0.0.1&var-server1=192.168.0.100'); }
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { const anchorInfo = { url: 'javascript:alert(document.domain)', }; expect(linkSrv.getLinkUrl(anchorInfo)).toBe('about:blank'); updateConfig({ disableSanitizeHtml: true, }); expect(linkSrv.getLinkUrl(anchorInfo)).toBe(anchorInfo.url); }
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { it('then it should return correct suggestions', () => { const frame = toDataFrame({ name: 'indoor', fields: [ { name: 'time', type: FieldType.time, values: [1, 2, 3] }, { name: 'temperature', type: FieldType.number, values: [10, 11, 12] }, ], }); ...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { const frame = toDataFrame({ name: 'indoor', fields: [ { name: 'time', type: FieldType.time, values: [1, 2, 3] }, { name: 'temperature', type: FieldType.number, values: [10, 11, 12] }, ], }); const suggestions = getDataFrameVars([frame]); exp...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { it('then it should return correct suggestions', () => { const frame = toDataFrame({ name: 'temperatures', fields: [ { name: 'time', type: FieldType.time, values: [1, 2, 3] }, { name: 'temperature.indoor', type: FieldType.number, values: [10, 11, 12] }, ], ...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { const frame = toDataFrame({ name: 'temperatures', fields: [ { name: 'time', type: FieldType.time, values: [1, 2, 3] }, { name: 'temperature.indoor', type: FieldType.number, values: [10, 11, 12] }, ], }); const suggestions = getDataFrameVars([frame]...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { it('then it should return correct suggestions', () => { const frame = toDataFrame({ name: 'temperatures', fields: [ { name: 'time', type: FieldType.time, values: [1, 2, 3] }, { name: 'temperature.indoor', type: FieldType.number, values: [10, 11, 12] }, ], ...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { const frame = toDataFrame({ name: 'temperatures', fields: [ { name: 'time', type: FieldType.time, values: [1, 2, 3] }, { name: 'temperature.indoor', type: FieldType.number, values: [10, 11, 12] }, ], }); frame.fields[1].config = { ...frame.fields[1...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { it('then it should ignore duplicates', () => { const frame = toDataFrame({ name: 'temperatures', fields: [ { name: 'time', type: FieldType.time, values: [1, 2, 3] }, { name: 'temperature.indoor', type: FieldType.number, values: [10, 11, 12] }, { name: 'te...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { const frame = toDataFrame({ name: 'temperatures', fields: [ { name: 'time', type: FieldType.time, values: [1, 2, 3] }, { name: 'temperature.indoor', type: FieldType.number, values: [10, 11, 12] }, { name: 'temperature.outdoor', type: FieldType.number, values:...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { it('it should not return any suggestions', () => { const frame1 = toDataFrame({ name: 'server1', fields: [ { name: 'time', type: FieldType.time, values: [1, 2, 3] }, { name: 'value', type: FieldType.number, values: [10, 11, 12] }, ], }); const ...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => { const frame1 = toDataFrame({ name: 'server1', fields: [ { name: 'time', type: FieldType.time, values: [1, 2, 3] }, { name: 'value', type: FieldType.number, values: [10, 11, 12] }, ], }); const frame2 = toDataFrame({ name: 'server2', ...
axinoss/grafana
public/app/features/panel/panellinks/specs/link_srv.test.ts
TypeScript
ArrowFunction
() => useDispatch<AppDispatch>()
rg872/dg-hoarder
app/src/hooks/redux.ts
TypeScript
ArrowFunction
() => { let content = <> <TwoPageBanner currentUri="contact" /> <section className="contact_area p_120"> <div className="container"> <div className="row"> <div className="col-lg-3"> <div className="contact_info"> <div cl...
YonnaR/portfolio
client/src/Views/user/ContactPage.tsx
TypeScript
ArrowFunction
() => { let component: VerifiedScreenComponent; let fixture: ComponentFixture<VerifiedScreenComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [VerifiedScreenComponent], imports: [ TranslateModule.forRoot(), SharedMaterialModule, ToastrModule.forRoot(), Rout...
governmentbg/eAuth-v2
eauth-tfa/src/app/components/verified-screen/verified-screen.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [VerifiedScreenComponent], imports: [ TranslateModule.forRoot(), SharedMaterialModule, ToastrModule.forRoot(), RouterTestingModule, HttpClientModule, ], providers: [UtilService], }).compileComponents(); }
governmentbg/eAuth-v2
eauth-tfa/src/app/components/verified-screen/verified-screen.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(VerifiedScreenComponent); component = fixture.componentInstance; fixture.detectChanges(); }
governmentbg/eAuth-v2
eauth-tfa/src/app/components/verified-screen/verified-screen.component.spec.ts
TypeScript
ArrowFunction
(link, idx) => ( <React.Fragment key={idx}> {FoundationDataHelper.buildLink(link.url, link.label)}
iotaledger/iota-react-components
src/utils/foundationDataHelper.tsx
TypeScript
ClassDeclaration
/** * Class to help with foundation data. */ export class FoundationDataHelper { /** * The location of the foundation data. */ public static FOUNDATION_DATA_URL: string = "https://webassets.iota.org/data/foundation.json"; /** * Cached version of the data. */ private static _founda...
iotaledger/iota-react-components
src/utils/foundationDataHelper.tsx
TypeScript
MethodDeclaration
/** * Load the found data. * @returns The loaded foundation data. */ public static async loadData(): Promise<IFoundationData | undefined> { if (!FoundationDataHelper._foundationData) { try { const foundationDataResponse = await fetch(FoundationDataHelper.FOUNDATION_DAT...
iotaledger/iota-react-components
src/utils/foundationDataHelper.tsx
TypeScript
MethodDeclaration
/** * Create the display for a value. * @param info The information to display. * @param info.label The label for the information. * @param info.value The optional value for the information. * @param info.urls The optional urls. * @param key The key of the item. * @returns The element...
iotaledger/iota-react-components
src/utils/foundationDataHelper.tsx
TypeScript
ArrowFunction
() => { it("should call ParamFilter.useParam method with the correct parameters", () => { class Test {} class Ctrl { test(@Cookies("expression", Test) body: Test) {} } const param = ParamRegistry.get(Ctrl, "test", 0); param.expression.should.eq("expression"); param.paramType.should.eq...
psicomante/tsed
packages/common/src/mvc/decorators/params/cookies.spec.ts
TypeScript
ArrowFunction
() => { class Test {} class Ctrl { test(@Cookies("expression", Test) body: Test) {} } const param = ParamRegistry.get(Ctrl, "test", 0); param.expression.should.eq("expression"); param.paramType.should.eq(ParamTypes.COOKIES); param.type.should.eq(Test); }
psicomante/tsed
packages/common/src/mvc/decorators/params/cookies.spec.ts
TypeScript
ClassDeclaration
class Test {}
psicomante/tsed
packages/common/src/mvc/decorators/params/cookies.spec.ts
TypeScript
ClassDeclaration
class Ctrl { test(@Cookies("expression", Test) body: Test) {} }
psicomante/tsed
packages/common/src/mvc/decorators/params/cookies.spec.ts
TypeScript
MethodDeclaration
test(@Cookies("expression", Test) body: Test) {}
psicomante/tsed
packages/common/src/mvc/decorators/params/cookies.spec.ts
TypeScript
ArrowFunction
(args: IconProps) => <ThreeDots {...args} />
dkress59/react-loading-icons
stories/herbert-sam/three-dots.stories.tsx
TypeScript
ClassDeclaration
/** * Mesh representing the gorund */ export declare class GroundMesh extends Mesh { /** If octree should be generated */ generateOctree: boolean; private _heightQuads; /** @hidden */ _subdivisionsX: number; /** @hidden */ _subdivisionsY: number; /** @hidden */ _width: number; ...
Servletparty/pbi-hexagrid
node_modules/@babylonjs/core/Meshes/groundMesh.d.ts
TypeScript
MethodDeclaration
/** * "GroundMesh" * @returns "GroundMesh" */ getClassName(): string;
Servletparty/pbi-hexagrid
node_modules/@babylonjs/core/Meshes/groundMesh.d.ts
TypeScript
MethodDeclaration
/** * This function will update an octree to help to select the right submeshes for rendering, picking and collision computations. * Please note that you must have a decent number of submeshes to get performance improvements when using an octree * @param chunksCount the number of subdivisions for x and y...
Servletparty/pbi-hexagrid
node_modules/@babylonjs/core/Meshes/groundMesh.d.ts
TypeScript
MethodDeclaration
/** * Returns a height (y) value in the Worl system : * the ground altitude at the coordinates (x, z) expressed in the World system. * @param x x coordinate * @param z z coordinate * @returns the ground y position if (x, z) are outside the ground surface. */ getHeightAtCoordinates(x: numbe...
Servletparty/pbi-hexagrid
node_modules/@babylonjs/core/Meshes/groundMesh.d.ts
TypeScript
MethodDeclaration
/** * Returns a normalized vector (Vector3) orthogonal to the ground * at the ground coordinates (x, z) expressed in the World system. * @param x x coordinate * @param z z coordinate * @returns Vector3(0.0, 1.0, 0.0) if (x, z) are outside the ground surface. */ getNormalAtCoordinates(x: nu...
Servletparty/pbi-hexagrid
node_modules/@babylonjs/core/Meshes/groundMesh.d.ts
TypeScript
MethodDeclaration
/** * Updates the Vector3 passed a reference with a normalized vector orthogonal to the ground * at the ground coordinates (x, z) expressed in the World system. * Doesn't uptade the reference Vector3 if (x, z) are outside the ground surface. * @param x x coordinate * @param z z coordinate ...
Servletparty/pbi-hexagrid
node_modules/@babylonjs/core/Meshes/groundMesh.d.ts
TypeScript
MethodDeclaration
/** * Force the heights to be recomputed for getHeightAtCoordinates() or getNormalAtCoordinates() * if the ground has been updated. * This can be used in the render loop. * @returns the GroundMesh. */ updateCoordinateHeights(): GroundMesh;
Servletparty/pbi-hexagrid
node_modules/@babylonjs/core/Meshes/groundMesh.d.ts
TypeScript
MethodDeclaration
/** * Serializes this ground mesh * @param serializationObject object to write serialization to */ serialize(serializationObject: any): void;
Servletparty/pbi-hexagrid
node_modules/@babylonjs/core/Meshes/groundMesh.d.ts
TypeScript
MethodDeclaration
/** * Parses a serialized ground mesh * @param parsedMesh the serialized mesh * @param scene the scene to create the ground mesh in * @returns the created ground mesh */ static Parse(parsedMesh: any, scene: Scene): GroundMesh;
Servletparty/pbi-hexagrid
node_modules/@babylonjs/core/Meshes/groundMesh.d.ts
TypeScript
ArrowFunction
({ children }) => { const history = useHistory() const isDisabled = history.length <= 2 const handleClick = useCallback(() => history.goBack(), [history]) return ( <div className={classNames('Back', { disabled: isDisabled })} onClick={handleClick} > {children} </div>
jonhue/plaain
src/components/Back.tsx
TypeScript
MethodDeclaration
classNames('Back', { disabled: isDisabled })
jonhue/plaain
src/components/Back.tsx
TypeScript
TypeAliasDeclaration
export type Track = { id: string; name: string; link: string; artist: string[] | null; album: string[] | null; lastPlayed?: string; length: string; };
cephalization/megawave
packages/web/src/types/library.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-resources', templateUrl: './resources.component.html', styleUrls: ['./resources.component.scss'] }) export class ResourcesComponent implements OnInit { constructor() {} ngOnInit() { // Specifies the language library to load for Highlights.js instead of loading all languages ...
Narshe1412/Code-Institute-Interactive-Frontend-Algorithms
src/app/resources/resources.component.ts
TypeScript
MethodDeclaration
ngOnInit() { // Specifies the language library to load for Highlights.js instead of loading all languages hljs.registerLanguage('javascript', javascript); }
Narshe1412/Code-Institute-Interactive-Frontend-Algorithms
src/app/resources/resources.component.ts
TypeScript
FunctionDeclaration
export function loadDataSources(): ThunkResult<void> { return async (dispatch) => { const response = await getBackendSrv().get('/api/datasources'); dispatch(dataSourcesLoaded(response)); }; }
fhirfactory/pegacorn-base-docker-node-alpine-itops
public/app/features/datasources/state/actions.ts
TypeScript
FunctionDeclaration
export function loadDataSource(uid: string): ThunkResult<void> { return async (dispatch) => { const dataSource = await getDataSourceUsingUidOrId(uid); const pluginInfo = (await getPluginSettings(dataSource.type)) as DataSourcePluginMeta; const plugin = await importDataSourcePlugin(pluginInfo); const ...
fhirfactory/pegacorn-base-docker-node-alpine-itops
public/app/features/datasources/state/actions.ts
TypeScript
FunctionDeclaration
/** * Get data source by uid or id, if old id detected handles redirect */ async function getDataSourceUsingUidOrId(uid: string): Promise<DataSourceSettings> { // Try first with uid api try { const byUid = await getBackendSrv() .fetch<DataSourceSettings>({ method: 'GET', url: `/api/datas...
fhirfactory/pegacorn-base-docker-node-alpine-itops
public/app/features/datasources/state/actions.ts
TypeScript