type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
MethodDeclaration
private hasParseErrors(model: ITextModel): boolean { const parseErrors: json.ParseError[] = []; json.parse(model.getValue(), parseErrors); return parseErrors.length > 0; }
Al-khwarizmi1/vscode
src/vs/workbench/services/configuration/common/jsonEditingService.ts
TypeScript
MethodDeclaration
private resolveAndValidate(resource: URI, checkDirty: boolean): Promise<IReference<IResolvedTextEditorModel>> { return this.resolveModelReference(resource) .then(reference => { const model = reference.object.textEditorModel; if (this.hasParseErrors(model)) { return this.reject<IReference<IResolvedTe...
Al-khwarizmi1/vscode
src/vs/workbench/services/configuration/common/jsonEditingService.ts
TypeScript
MethodDeclaration
private reject<T>(code: JSONEditingErrorCode): Promise<T> { const message = this.toErrorMessage(code); return Promise.reject(new JSONEditingError(message, code)); }
Al-khwarizmi1/vscode
src/vs/workbench/services/configuration/common/jsonEditingService.ts
TypeScript
MethodDeclaration
private toErrorMessage(error: JSONEditingErrorCode): string { switch (error) { // User issues case JSONEditingErrorCode.ERROR_INVALID_FILE: { return nls.localize('errorInvalidFile', "Unable to write into the file. Please open the file to correct errors/warnings in the file and try again."); } case JS...
Al-khwarizmi1/vscode
src/vs/workbench/services/configuration/common/jsonEditingService.ts
TypeScript
FunctionDeclaration
function getTextMatchesUnderCursor( lineText: string, columnNumber: number, regex: RegExp, ): string[] | undefined { for (const match of lineText.matchAll(regex)) { const { index } = match; if (index === undefined) { continue; } if (index === -1) { continue; } if (_inRange(columnNumber, index,...
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
ArrowFunction
( line: vscode.TextLine, position: vscode.Position, ): Token | undefined => { for (const { type, pattern } of tokenTypePatternMap) { let matches = getTextMatchesUnderCursor( line.text, position.character, new RegExp(pattern), ); if (matches !== undefined) { return { matches, type, }; ...
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
ArrowFunction
async ( glob: string, ): Promise<vscode.Location[] | undefined> => { const files = await vscode.workspace.findFiles(glob); if (files.length === 0) { return; } return files.map( (uri) => new vscode.Location(uri, new vscode.Position(0, 0)), ); }
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
ArrowFunction
(uri) => new vscode.Location(uri, new vscode.Position(0, 0))
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
ArrowFunction
async ( glob: string, search: string, ): Promise<vscode.Location[] | undefined> => { const files = await vscode.workspace.findFiles(glob); if (files.length === 0) { return; } const lines = await ripgrep({ search, paths: files.map((uri) => uri.fsPath), args: ['--vimgrep'], }); return lines.map((s) =>...
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
ArrowFunction
(uri) => uri.fsPath
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
ArrowFunction
(s) => { const [filepath, lineNumber, columnNumber] = s.split(':'); return new vscode.Location( vscode.Uri.from({ path: filepath, scheme: 'file', }), new vscode.Position( Number(lineNumber) - 1, Number(columnNumber) - 1, ), ); }
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
ClassDeclaration
export class DefinitionProviderImpl implements vscode.DefinitionProvider { async provideDefinition( document: vscode.TextDocument, position: vscode.Position, ): Promise<vscode.Definition | undefined> { if (!isGoToDefinitionEnabled()) { return; } const token = getToken(document.lineAt(position), positio...
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
InterfaceDeclaration
interface Token { matches: string[]; type: TokenType; }
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
TypeAliasDeclaration
type TokenType = | 'className' | 'methodInvocation' | 'pathFileName' | 'pathLocator';
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
MethodDeclaration
async provideDefinition( document: vscode.TextDocument, position: vscode.Position, ): Promise<vscode.Definition | undefined> { if (!isGoToDefinitionEnabled()) { return; } const token = getToken(document.lineAt(position), position); if (!token) { return; } switch (token.type) { case 'classN...
Tim-Cao/vscode-poshi-language-support
src/lib/languageFeatureProviders/DefinitionProviderImpl.ts
TypeScript
ClassDeclaration
class ProfileUserControler { async handle(request: Request, response: Response){ const user_id = request.user_id const service = new ProfileUserService() const result = await service.execite(user_id) return response.json(result) } }
GabrSobral/NLW_Heat
node/src/controllers/ProfileUserController.ts
TypeScript
MethodDeclaration
async handle(request: Request, response: Response){ const user_id = request.user_id const service = new ProfileUserService() const result = await service.execite(user_id) return response.json(result) }
GabrSobral/NLW_Heat
node/src/controllers/ProfileUserController.ts
TypeScript
ArrowFunction
() => { it('Should be category', () => { expect(getFacetType([])).toBe('category') }) it('Should be range', () => { expect(getFacetType({})).toBe('range') }) it('Should be text', () => { expect(getFacetType('')).toBe('text') }) }
cMikolai/findify-js
packages/agent/src/utils/__tests__/utils.test.ts
TypeScript
ArrowFunction
() => { expect(getFacetType([])).toBe('category') }
cMikolai/findify-js
packages/agent/src/utils/__tests__/utils.test.ts
TypeScript
ArrowFunction
() => { expect(getFacetType({})).toBe('range') }
cMikolai/findify-js
packages/agent/src/utils/__tests__/utils.test.ts
TypeScript
ArrowFunction
() => { expect(getFacetType('')).toBe('text') }
cMikolai/findify-js
packages/agent/src/utils/__tests__/utils.test.ts
TypeScript
ArrowFunction
() => { const state = { q: '', filters: { text: ['text'], category1: [['category1']], category2: [['category2']], range: [{ from: 1, to: 2 }] } }; const query = { q: '', filters: [{ name: 'text', type: 'text', values: [{ value: 'text' }] }, { ...
cMikolai/findify-js
packages/agent/src/utils/__tests__/utils.test.ts
TypeScript
ArrowFunction
() => { expect(stateToQuery(fromJS(state)).toJS()).toEqual(query) }
cMikolai/findify-js
packages/agent/src/utils/__tests__/utils.test.ts
TypeScript
ArrowFunction
() => { expect(queryToState(fromJS({ q: true, filters: {} }), fromJS(query)).toJS()).toEqual(state) }
cMikolai/findify-js
packages/agent/src/utils/__tests__/utils.test.ts
TypeScript
ClassDeclaration
@NgModule({ imports: [ ThemeModule, AngularEchartsModule, ], declarations: [ DashboardComponent, StatusCardComponent, TemperatureDraggerComponent, ContactsComponent, RoomSelectorComponent, TemperatureComponent, RoomsComponent, TeamComponent, KittenComponent, Securi...
rahul404/NSE-Hackathon-HperChain
src/app/pages/dashboard/dashboard.module.ts
TypeScript
FunctionDeclaration
function prepareGuidedTour(guidedTour: GuidedTour) { // Prepare GuidedTourService and GuidedTourComponent spyOn(guidedTourService, 'init').and.returnValue(of()); spyOn(guidedTourService, 'getLastSeenTourStepIndex').and.returnValue(0); spyOn<any>(guidedTourService, 'check...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
FunctionDeclaration
async function startCourseOverviewTour(guidedTour: GuidedTour) { guidedTourComponent.ngAfterViewInit(); await guidedTourComponentFixture.ngZone!.run(() => { router.navigateByUrl('/courses'); }); // Start course overview tour expect(guidedTou...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
FunctionDeclaration
function resetCurrentTour(): void { guidedTourService['currentCourse'] = null; guidedTourService['currentExercise'] = null; guidedTourService.currentTour = completedTour; guidedTourService.resetTour(); }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
FunctionDeclaration
function currentCourseAndExerciseNull(): void { expect(guidedTourService.currentTour).to.be.null; expect(guidedTourService['currentCourse']).to.be.null; expect(guidedTourService['currentExercise']).to.be.null; }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
FunctionDeclaration
function prepareParticipation(exercise: Exercise, studentParticipation: StudentParticipation, httpResponse: HttpResponse<StudentParticipation>) { exercise.course = course1; exercise.studentParticipations = [studentParticipation]; findParticipationStub.reset()...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { let service: GuidedTourService; let httpMock: HttpTestingController; const expected = new GuidedTourSetting('guided_tour_key', 1, GuidedTourState.STARTED); beforeEach(() => { TestBed.configureTestingModule({ imports: [ArtemisTestModule, ArtemisShared...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ imports: [ArtemisTestModule, ArtemisSharedModule, HttpClientTestingModule], providers: [ { provide: DeviceDetectorService }, { provide: LocalStorageService, useClass: MockSyncStorage }, ...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { httpMock.verify(); }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { service.guidedTourSettings = []; service['updateGuidedTourSettings']('guided_tour_key', 1, GuidedTourState.STARTED).subscribe(); const req = httpMock.expectOne({ method: 'PUT' }); const resourceUrl = SERVER_API_URL + 'api/guided-tour-settings'; expect...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { service.guidedTourSettings = [new GuidedTourSetting('guided_tour_key', 1, GuidedTourState.STARTED)]; service['deleteGuidedTourSetting']('guided_tour_key').subscribe(); const req = httpMock.expectOne({ method: 'DELETE' }); const resourceUrl = SERVER_API_URL + 'api...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ imports: [ ArtemisTestModule, ArtemisSharedModule, RouterTestingModule.withRoutes([ { path: 'courses', compone...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { guidedTourComponentFixture = TestBed.createComponent(GuidedTourComponent); guidedTourComponent = guidedTourComponentFixture.componentInstance; const navBarComponentFixture = TestBed.createComponent(NavbarComponent); // eslint-disa...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { guidedTourService['availableTourForComponent'] = guidedTour; guidedTourService.currentTour = guidedTour; }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { router.navigateByUrl('/courses'); }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { beforeEach(async () => { prepareGuidedTour(tour); await startCourseOverviewTour(tour); }); it('should start and finish the course overview guided tour', async () => { // Navigate to next step const nextButton =...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
async () => { prepareGuidedTour(tour); await startCourseOverviewTour(tour); }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
async () => { // Navigate to next step const nextButton = guidedTourComponentFixture.debugElement.query(By.css('.next-button')); expect(nextButton).to.exist; nextButton.nativeElement.click(); expect(guidedTourService.isOnLastStep).to.be.tr...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { const skipButton = guidedTourComponentFixture.debugElement.query(By.css('.close')); expect(skipButton).to.exist; skipButton.nativeElement.click(); guidedTourComponentFixture.detectChanges(); expect(guidedTourComponentFixture.debugE...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { const backdrop = guidedTourComponentFixture.debugElement.queryAll(By.css('.guided-tour-overlay')); expect(backdrop).to.exist; expect(backdrop.length).to.equal(4); backdrop.forEach((overlay) => { overlay.nativeElement.click(); ...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
(overlay) => { overlay.nativeElement.click(); }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { beforeEach(async () => { prepareGuidedTour(tourWithUserInteraction); await startCourseOverviewTour(tourWithUserInteraction); }); it('should disable the next button', () => { guidedTourComponentFixture.detectChanges(); ...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
async () => { prepareGuidedTour(tourWithUserInteraction); await startCourseOverviewTour(tourWithUserInteraction); }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { guidedTourComponentFixture.detectChanges(); const nextButton = guidedTourComponentFixture.debugElement.nativeElement.querySelector('.next-button').disabled; expect(nextButton).to.exist; }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
async () => { guidedTourService.guidedTourMapping = guidedTourMapping; prepareGuidedTour(tourWithCourseAndExercise); resetCurrentTour(); }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { spyOn(courseService, 'findWithExercises').and.returnValue(of({ body: course1 } as HttpResponse<any>)); const courses = [course1]; // enable tour for matching course title guidedTourService.enableTourForCourseOverview(courses, tourWithCourseAndExe...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { const courses = [course2]; // disable tour for not matching titles guidedTourService.enableTourForCourseOverview(courses, tourWithCourseAndExercise, true); currentCourseAndExerciseNull(); }
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { // disable tour for exercises without courses guidedTourService.currentTour = null; guidedTourService.enableTourForExercise(exercise1, tourWithCourseAndExercise, true); currentCourseAndExerciseNull(); resetCurrentTour(); ...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { guidedTourService.currentTour = null; // enable tour for matching course / exercise short name guidedTourService.enableTourForCourseExerciseComponent(course1, tourWithCourseAndExercise, true); expect(guidedTourService.currentTour).to.equal(tourWi...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
(exercise) => { exercise.course = course1; if (exercise === exercise1) { expect(guidedTourService['isGuidedTourAvailableForExercise'](exercise)).to.be.true; } else { expect(guidedTourService['isGuidedTourAvailab...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { const studentParticipation1 = { id: 1, student: { id: 1 }, exercise: exercise1, initializationState: InitializationState.INITIALIZED } as StudentParticipation; const studentParticipation2 = { id: 2, student: { id: 1 }, exercise: exercise3, initializationState: InitializationStat...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { course1.exercises.push(exercise4); prepareParticipation(exercise1, studentParticipation1, httpResponse1); guidedTourService.enableTourForExercise(exercise1, tourWithCourseAndExercise, true); guidedTourService.restartTour(); ...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
(exercise) => (exercise.id = exercise4.id)
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { it('should enable the next step if the results are correct', inject( [], fakeAsync(() => { const enableNextStep = spyOn<any>(guidedTourService, 'enableNextStepClick').and.returnValue(of()); guidedTourService.currentTour = tourW...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
() => { const enableNextStep = spyOn<any>(guidedTourService, 'enableNextStepClick').and.returnValue(of()); guidedTourService.currentTour = tourWithModelingTask; guidedTourService.updateModelingResult(personUML.name, true); tick(0); ...
FrankeLukas/Artemis
src/test/javascript/spec/service/guided-tour.service.spec.ts
TypeScript
ArrowFunction
(i) => ({ key: `${i + 1}`, label: `Item ${i + 1}`, })
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
({ canvasElement }: { canvasElement: HTMLCanvasElement }) => { const canvas = within(canvasElement); const thirdItem = canvas.getByText('Item 3', { selector: 'button[data-testid="list-item-3"] p', }); userEvent.click(thirdItem); }
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
() => ( <Body noMargin
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
({ label, showMoreInfo, showLoading, showClose, onBack, onClose, }: DefaultChildrenProps & Partial<ChildrenRenderProps>) => { const { setSidePanel } = useSidePanel(); if (showLoading) { return <Body noMargin>{`Loading the details of ${label}...`}</Body>; }
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
(renderProps) => ( <DefaultChildren label={label}
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
(props: SidePanelHookProps) => { const [selectedItem, setSelectedItem] = useState<string>(null); const { setSidePanel } = useSidePanel(); return ( <ListItemGroup items={items.map((item) => ({ ...item, 'variant': 'navigation', 'selected': item.key === selectedItem, 'onCl...
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
(item) => ({ ...item, 'variant': 'navigation', 'selected': item.key === selectedItem, 'onClick': () => { setSidePanel({ ...props, children: <DefaultChildren label={item.label} showMoreInfo />, onClose: () => setSelectedItem(null), ...
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
() => { setSidePanel({ ...props, children: <DefaultChildren label={item.label} showMoreInfo />, onClose: () => setSelectedItem(null), }
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
() => setSelectedItem(null)
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
(props: SidePanelHookProps): JSX.Element => ( <div style={
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
(props: SidePanelHookProps): JSX.Element => { const [isSideNavigationOpen, setSideNavigationOpen] = useState(false); const hamburger = { activeLabel: 'Close side navigation', inactiveLabel: 'Open side navigation', isActive: isSideNavigationOpen, onClick: () => setSideNavigationOpen((prev) => !prev)...
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
() => setSideNavigationOpen((prev) => !prev)
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
(props: SidePanelHookProps) => { const [selectedItem, setSelectedItem] = useState<string>(null); const { setSidePanel, updateSidePanel, removeSidePanel } = useSidePanel(); return ( <ListItemGroup items={items.map((item) => ({ ...item, 'variant': 'navigation', 'selected': item.k...
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
(item) => ({ ...item, 'variant': 'navigation', 'selected': item.key === selectedItem, 'onClick': () => { if (selectedItem === item.key) { setSelectedItem(null); removeSidePanel(); } else { setSidePanel({ ...props, ...
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
() => { if (selectedItem === item.key) { setSelectedItem(null); removeSidePanel(); } else { setSidePanel({ ...props, children: ({ onClose }) => ( <DefaultChildren label={item.label} s...
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
({ onClose }) => ( <DefaultChildren label={item.label}
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
() => { updateSidePanel({ children: ({ onClose }) => ( <DefaultChildren label={item.label} showMoreInfo showClose onClose={onClose} /> ), }
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ArrowFunction
({ onClose }) => ( <DefaultChildren label={item.label}
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
TypeAliasDeclaration
type DefaultChildrenProps = { label: string; showMoreInfo?: boolean; showLoading?: boolean; showClose?: boolean; };
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
MethodDeclaration
spacing('mega')
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
MethodDeclaration
spacing({ bottom: 'mega' })
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
MethodDeclaration
spacing({ left: 'mega', bottom: 'mega' })
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
MethodDeclaration
setSelectedItem(item
sumup/circuit-ui
packages/circuit-ui/components/SidePanel/SidePanel.stories.tsx
TypeScript
ClassDeclaration
/** * A {@link PointerEvent} for button presses/releases, containing helpers for * checking whether it was the left/primary button, right/secondary button or * middle/tertiary button. Always take the button ID into account when handling * this event as you get a pair of {@link PointerPress} and * {@link PointerRel...
rafern/canvas-ui
lib/events/PointerButtonEvent.d.ts
TypeScript
ArrowFunction
(d: any) => { return { tid: d.tid, title: d.title, description: d.title, category: d.category, // d.category.name count: d.viewcount, timeinfo: d.timestamp, user: d.user, upvotes: d.upvotes, downvotes: d.downvotes, ...
sainathabhi/ui-static
library/ws-widget/collection/src/lib/card-home-discuss/card-home-discuss.component.ts
TypeScript
ClassDeclaration
/* tslint:enable */ @Component({ selector: 'ws-widget-home-discuss-component', templateUrl: './card-home-discuss.component.html', styleUrls: ['./card-home-discuss.component.scss'], // providers: [DiscussService], }) export class CardHomeDiscussComponent extends WidgetBaseComponent implements OnInit, NsWidgetRes...
sainathabhi/ui-static
library/ws-widget/collection/src/lib/card-home-discuss/card-home-discuss.component.ts
TypeScript
MethodDeclaration
// starColor: StarRatingColor = StarRatingColor.accent // starColorP: StarRatingColor = StarRatingColor.primary // starColorW: StarRatingColor = StarRatingColor.warn ngOnInit(): void { if (this.widgetData && this.widgetData.content) { this.discuss = ([this.widgetData.content] || []).map((d: any) => { ...
sainathabhi/ui-static
library/ws-widget/collection/src/lib/card-home-discuss/card-home-discuss.component.ts
TypeScript
MethodDeclaration
getUserFullName(user: any) { if (user && user.username) { return `${user.username.trim()}` } return '' }
sainathabhi/ui-static
library/ws-widget/collection/src/lib/card-home-discuss/card-home-discuss.component.ts
TypeScript
MethodDeclaration
fillPopular() { // this.discussService.fetchRecentD().subscribe((response: any) => { // this.discuss = _.get(response, 'topics') // // console.log(this.discuss) // }) }
sainathabhi/ui-static
library/ws-widget/collection/src/lib/card-home-discuss/card-home-discuss.component.ts
TypeScript
MethodDeclaration
getDiscussion(discuss: any) { // tslint:disable-next-line:max-line-length this.router.navigate([`/app/discussion-forum/topic/${_.trim(_.get(discuss, 'slug'))}`], { queryParams: { page: 'home' }, queryParamsHandling: 'merge' }) }
sainathabhi/ui-static
library/ws-widget/collection/src/lib/card-home-discuss/card-home-discuss.component.ts
TypeScript
MethodDeclaration
public getBgColor(tagTitle: any) { const bgColor = this.stringToColor(tagTitle.toLowerCase()) const color = this.getContrast() return { color, 'background-color': bgColor } }
sainathabhi/ui-static
library/ws-widget/collection/src/lib/card-home-discuss/card-home-discuss.component.ts
TypeScript
MethodDeclaration
stringToColor(title: any) { let hash = 0 // tslint:disable-next-line: no-bitwise for (const element of title) { // tslint:disable-next-line: no-bitwise hash = title.charCodeAt(element) + ((hash << 5) - hash) } const hue = Math.abs(hash % 360) // tslint:disable-next-line: prefer-temp...
sainathabhi/ui-static
library/ws-widget/collection/src/lib/card-home-discuss/card-home-discuss.component.ts
TypeScript
MethodDeclaration
getContrast() { return 'rgba(255, 255, 255, 80%)' }
sainathabhi/ui-static
library/ws-widget/collection/src/lib/card-home-discuss/card-home-discuss.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'demo-emoji-counter-detach-invisible', templateUrl: './emoji-counter.component.html', styleUrls: ['./emoji-counter.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, }) export class EmojiCounterDetachInvisibleComponent extends DetachInvisibleDirective { @Input() public...
ArtemeeSenin/ngx-detach-invisible
packages/demo/src/app/emoji-counter/emoji-counter-detach-invisible.component.ts
TypeScript
ClassDeclaration
@NgModule({ declarations: [ ProfileComponent ], imports: [ CommonModule, FormsModule, NgbModule, SharedModule, profileRouting ] }) export class ProfileModule {}
kolawoletech/ferry-me-admin
src/app/profile/profile.module.ts
TypeScript
ArrowFunction
(argv: argvType) => { for (let command of commands) { const { done } = <CommandTerminatedType>command(argv); if (done) break; } }
filipemacedo/react-drab
src/commands/index.ts
TypeScript
ClassDeclaration
@NgModule({ declarations: [ AppComponent, HomeComponent, AboutComponent, ToastComponent, SubmitComponent ], imports: [ BrowserModule, FormsModule, ReactiveFormsModule, HttpModule, routing, SelectModule, Ng2UploaderModule ], providers: [ DataService, Toa...
MojtabaGhavidel/Property-Full-Stack
src/app/app.module.ts
TypeScript
ArrowFunction
() => { it('should build', () => { expect(new KonamiListener()).toBeTruthy(); }); describe('keyboard', () => { let element: HTMLElement; let press = function(key) { let event = new KeyboardEvent('keydown', { key }); document.dispatchEvent(event); } beforeEach(async () => { ...
natemoo-re/konami-listener
src/components/konami-listener/konami-listener.spec.ts
TypeScript
ArrowFunction
() => { expect(new KonamiListener()).toBeTruthy(); }
natemoo-re/konami-listener
src/components/konami-listener/konami-listener.spec.ts
TypeScript
ArrowFunction
() => { let element: HTMLElement; let press = function(key) { let event = new KeyboardEvent('keydown', { key }); document.dispatchEvent(event); } beforeEach(async () => { element = await render({ components: [KonamiListener], html: '<konami-listener></konami-listener...
natemoo-re/konami-listener
src/components/konami-listener/konami-listener.spec.ts
TypeScript
ArrowFunction
async () => { element = await render({ components: [KonamiListener], html: '<konami-listener></konami-listener>' }); }
natemoo-re/konami-listener
src/components/konami-listener/konami-listener.spec.ts
TypeScript