type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
h => h < 12 && h > 0
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
ArrowFunction
option => formatOption(option, disabledOptions)
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
ArrowFunction
c => (format.match(/\sA/) ? c.toUpperCase() : c)
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
ArrowFunction
c => ({ value: c })
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
ClassDeclaration
export class Combobox extends Component<IComboboxProps, {}> { public onItemChange = (type: any, itemValue: any) => { const { onChange, defaultOpenValue, use12Hours } = this.props; const value = (this.props.value || defaultOpenValue).clone(); if (type === "hour") { if (use12Hours) { if (this...
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
InterfaceDeclaration
interface IComboboxProps { format: string; defaultOpenValue: moment.Moment; prefixCls: string; value?: moment.Moment; onChange: (...args: any[]) => any; showHour?: boolean; showMinute?: boolean; showSecond?: boolean; hourOptions: any[]; minuteOptions: any[]; secondOptions: any[]; disabledHours?...
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
MethodDeclaration
public getHourSelect(hour: any) { const { prefixCls, hourOptions, disabledHours, showHour, use12Hours } = this.props; if (!showHour) { return null; } const disabledOptions = disabledHours && disabledHours(); let hourOptionsAdj; let hourAdj; if (use12H...
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
MethodDeclaration
public getMinuteSelect(minute: any) { const { prefixCls, minuteOptions, disabledMinutes, defaultOpenValue, showMinute } = this.props; if (!showMinute) { return null; } const value = this.props.value || defaultOpenValue; const disabledOptions = disabledMinutes...
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
MethodDeclaration
public getSecondSelect(second: any) { const { prefixCls, secondOptions, disabledSeconds, showSecond, defaultOpenValue } = this.props; if (!showSecond) { return null; } const value = this.props.value || defaultOpenValue; const disabledOptions = disabledS...
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
MethodDeclaration
public getAMPMSelect() { const { prefixCls, use12Hours, format } = this.props; if (!use12Hours) { return null; } const AMPMOptions = ["am", "pm"] // If format has A char, then we should uppercase AM/PM .map(c => (format.match(/\sA/) ? c.toUpperCase() : c)) .map(c => ({ value: c })); ...
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
MethodDeclaration
public render() { const { prefixCls, defaultOpenValue } = this.props; const value = this.props.value || defaultOpenValue; return ( <div className={`${prefixCls}-combobox`}
Anddd7/molb-libui
src/components/timePicker/Combobox.tsx
TypeScript
InterfaceDeclaration
interface PaperPropsVariantOverrides { centered: true; }
BearerPipelineTest/hetty
admin/src/lib/mui/theme.ts
TypeScript
FunctionDeclaration
export declare function extendCandle(candle: any, decimalPlaces: number): any;
0xkarl/pennant
dist/types/stories/data-source/json-data-source.d.ts
TypeScript
ClassDeclaration
export declare class JsonDataSource implements DataSource { sub: any; marketId: string; _decimalPlaces: number; get decimalPlaces(): number; constructor(marketId: string, decimalPlaces: number); onReady(): Promise<{ decimalPlaces: number; supportedIntervals: Interval[]; ...
0xkarl/pennant
dist/types/stories/data-source/json-data-source.d.ts
TypeScript
MethodDeclaration
onReady(): Promise<{ decimalPlaces: number; supportedIntervals: Interval[]; priceMonitoringBounds: {}; }>;
0xkarl/pennant
dist/types/stories/data-source/json-data-source.d.ts
TypeScript
MethodDeclaration
query(interval: Interval, _from: string, _to: string): Promise<any[]>;
0xkarl/pennant
dist/types/stories/data-source/json-data-source.d.ts
TypeScript
MethodDeclaration
subscribeData(_interval: Interval, _onSubscriptionData: (datum: any) => void): void;
0xkarl/pennant
dist/types/stories/data-source/json-data-source.d.ts
TypeScript
MethodDeclaration
unsubscribeData(): void;
0xkarl/pennant
dist/types/stories/data-source/json-data-source.d.ts
TypeScript
MethodDeclaration
subscribeAnnotations(onSubscriptionAnnotation: (annotations: Annotation[]) => void): void;
0xkarl/pennant
dist/types/stories/data-source/json-data-source.d.ts
TypeScript
MethodDeclaration
unsubscribeAnnotations(): void;
0xkarl/pennant
dist/types/stories/data-source/json-data-source.d.ts
TypeScript
ArrowFunction
() => { const dispatch = useAppDispatch(); const params = useParams(); const navigate = useNavigate(); const poolAddress = params?.poolAddress ?? ''; const pool = useAppSelector((state) => userSelector.poolById(state, poolAddress)); const inTokenInfo = useAppSelector((state) => tokensSelector.tokenBy...
scuderia1000/tondex
src/containers/pool/remove/RemovePool.tsx
TypeScript
ArrowFunction
(state) => userSelector.poolById(state, poolAddress)
scuderia1000/tondex
src/containers/pool/remove/RemovePool.tsx
TypeScript
ArrowFunction
(state) => tokensSelector.tokenByAddress(state, pool?.firstToken?.address)
scuderia1000/tondex
src/containers/pool/remove/RemovePool.tsx
TypeScript
ArrowFunction
(state) => tokensSelector.tokenByAddress(state, pool?.secondToken?.address)
scuderia1000/tondex
src/containers/pool/remove/RemovePool.tsx
TypeScript
ArrowFunction
() => { dispatch(userActions.removePoolLiquidity(poolAddress)); navigate(-1); }
scuderia1000/tondex
src/containers/pool/remove/RemovePool.tsx
TypeScript
ArrowFunction
() => { dispatch(swapActions.updatePairPriceByPool(params?.poolAddress ?? '')); }
scuderia1000/tondex
src/containers/pool/remove/RemovePool.tsx
TypeScript
ArrowFunction
_ => { this.authService.setLoggedUser(user) this.favouriteCourses = user.favouriteMovies }
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
ArrowFunction
() => { this.getCourses(); }
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
ArrowFunction
response => { this.courses = response; }
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-course-cards-list', templateUrl: './course-cards-list.component.html', styleUrls: ['./course-cards-list.component.scss'] }) export class CoursesCardsListComponent implements OnInit, OnDestroy { courses: Course[]; formGroup: FormGroup; destroy$ = new Subject<boolean>(); isA...
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
MethodDeclaration
ngOnInit(): void { this.getCourses(); this.formGroup = this.fb.group({ search: [''] }); this.isAdmin = this.authService.getIsAdmin() this.favouriteCourses = this.authService.getFavouriteCourses() }
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
MethodDeclaration
ngOnDestroy(): void { this.destroy$.next(true); this.destroy$.unsubscribe(); }
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
MethodDeclaration
onCourseSelected(title: string): void { let user = this.authService.getLoggedUser() if(!user.favouriteMovies.includes(title)) { if(user.favouriteMovies.length > 0) { title = `, ${title}` } user.favouriteMovies = `${user.favouriteMovies}${title}` this.authService.updateUser(use...
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
MethodDeclaration
onSearch(): void { // get title from form const searchValue = this.formGroup.controls.search.value; this.getCourses(searchValue); }
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
MethodDeclaration
onClearSearch(): void { this.formGroup.get('search').setValue(null); this.getCourses(); }
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
MethodDeclaration
onDelete(id: number): void { this.coursesService.deleteCourse(id).pipe( takeUntil(this.destroy$) ).subscribe(() => { this.getCourses(); }); }
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
MethodDeclaration
private getCourses(searchValue?: string): void { this.coursesService.getCourses(searchValue).pipe( // map(response => response.filter(x => x.rating > 7)), takeUntil(this.destroy$) ).subscribe(response => { this.courses = response; }, error => { console.log(error); }); }
hristo1998/Courseing
course-app/src/app/courses/course-cards-list/course-cards-list.component.ts
TypeScript
ClassDeclaration
export class MessageContentTest extends AbstractTest { public run(): void { const that = this describe("MessageContent", function () { let transport: Transport let recipient1: AccountController let recipient2: AccountController let sender: AccountCon...
nmshd/cns-transport
test/modules/messages/MessageContent.test.ts
TypeScript
ClassDeclaration
@type("Mail") class Mail extends SerializableAsync implements IMail { @serialize({ type: CoreAddress }) @validate() public to: CoreAddress[] @serialize({ type: CoreAddress }) @validate({ nullable: true }) public cc: CoreAddress[] = [] @serialize() @validate() public subject: strin...
nmshd/cns-transport
test/modules/messages/MessageContent.test.ts
TypeScript
InterfaceDeclaration
interface IMail extends ISerializableAsync { to: ICoreAddress[] cc?: ICoreAddress[] subject: string body: string }
nmshd/cns-transport
test/modules/messages/MessageContent.test.ts
TypeScript
MethodDeclaration
public run(): void { const that = this describe("MessageContent", function () { let transport: Transport let recipient1: AccountController let recipient2: AccountController let sender: AccountController this.timeout(40000) befor...
nmshd/cns-transport
test/modules/messages/MessageContent.test.ts
TypeScript
MethodDeclaration
public static async from(value: IMail): Promise<Mail> { if (typeof value.cc === "undefined") { value.cc = [] } if (typeof value.body === "undefined" && (value as any).content) { value.body = (value as any).content delete (value as any).content } ...
nmshd/cns-transport
test/modules/messages/MessageContent.test.ts
TypeScript
ArrowFunction
() => { let component: NgxCheckboxComponent; let fixture: ComponentFixture<NgxCheckboxComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ NgxCheckboxComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(NgxChec...
DavidRnR/ngx-checkbox
src/app/modules/ngx-checkbox/ngx-checkbox.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [ NgxCheckboxComponent ] }) .compileComponents(); }
DavidRnR/ngx-checkbox
src/app/modules/ngx-checkbox/ngx-checkbox.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(NgxCheckboxComponent); component = fixture.componentInstance; fixture.detectChanges(); }
DavidRnR/ngx-checkbox
src/app/modules/ngx-checkbox/ngx-checkbox.component.spec.ts
TypeScript
ArrowFunction
() => { let component: SummaryComponent; let fixture: ComponentFixture<SummaryComponent>; beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [SummaryComponent], }).compileComponents(); }); beforeEach(() => { fixture = TestBed.createComponent(SummaryComponent); ...
DZemlyak/angular
apps/website/src/app/demos/submodules/dyn-forms/components/stepper/summary/summary.component.spec.ts
TypeScript
ArrowFunction
async () => { await TestBed.configureTestingModule({ declarations: [SummaryComponent], }).compileComponents(); }
DZemlyak/angular
apps/website/src/app/demos/submodules/dyn-forms/components/stepper/summary/summary.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(SummaryComponent); component = fixture.componentInstance; fixture.detectChanges(); }
DZemlyak/angular
apps/website/src/app/demos/submodules/dyn-forms/components/stepper/summary/summary.component.spec.ts
TypeScript
ArrowFunction
({title}: Props) => { return ( <header> <h1>{title}</h1> <hr /> </header> ) }
cadumega/EstudosReactB7Web-vite
src/components/Btn.tsx
TypeScript
TypeAliasDeclaration
type Props = { //title: string; // Especifiquei como uma prop obrigatoria title?: string; //opcional a prop }
cadumega/EstudosReactB7Web-vite
src/components/Btn.tsx
TypeScript
FunctionDeclaration
export function requestPiletsFromGraphQL(client: UrqlClient) { return gqlQuery<PiletQueryResult>(client, piletsQuery).then(({ pilets }) => pilets); }
MattShrider/piral
src/packages/piral-urql/src/pilets.ts
TypeScript
ArrowFunction
({ pilets }) => pilets
MattShrider/piral
src/packages/piral-urql/src/pilets.ts
TypeScript
InterfaceDeclaration
export interface PiletQueryResult { pilets: Array<PiletMetadata>; }
MattShrider/piral
src/packages/piral-urql/src/pilets.ts
TypeScript
ArrowFunction
() => { const snackMessageInitialState = {}; it('should display a snack message', () => { const snackMessage = 'Welcome to Kari4me'; const expectedAction = { snack: { message: snackMessage, withName: false, }, type: DISPLAY_SNACK_MESSAGE, }; const store = reduxMoc...
mashafrancis/guacamole-fe
src/store/modules/snack/snack.actions.test.ts
TypeScript
ArrowFunction
() => { const snackMessage = 'Welcome to Kari4me'; const expectedAction = { snack: { message: snackMessage, withName: false, }, type: DISPLAY_SNACK_MESSAGE, }; const store = reduxMockStore({}, snackMessageInitialState); store.dispatch(displaySnackMessage(snackMess...
mashafrancis/guacamole-fe
src/store/modules/snack/snack.actions.test.ts
TypeScript
FunctionDeclaration
function RsvpButton({ event, onSuccess, onError, }: RsvpButtonProps & RouteComponentProps) { const account = AuthProviderInstance.account; const hasJoinedEvent = useMemo<boolean>( () => !!account && (event.participants ?.map((person) => person.id) ?.includes(account.localAcco...
Itera/mad-learning
src/components/inputs/RsvpButton/RsvpButton.tsx
TypeScript
FunctionDeclaration
async function joinOrDropEvent( eventId: string, hasJoinedEvent: boolean ): Promise<boolean> { if (hasJoinedEvent) { await dropEvent(eventId); return true; } else { await joinEvent(eventId); return false; } }
Itera/mad-learning
src/components/inputs/RsvpButton/RsvpButton.tsx
TypeScript
ArrowFunction
() => !!account && (event.participants ?.map((person) => person.id) ?.includes(account.localAccountId) || event.owner?.id === account.localAccountId)
Itera/mad-learning
src/components/inputs/RsvpButton/RsvpButton.tsx
TypeScript
ArrowFunction
(person) => person.id
Itera/mad-learning
src/components/inputs/RsvpButton/RsvpButton.tsx
TypeScript
ArrowFunction
async () => { try { await joinOrDropEvent(event.id, hasJoinedEvent); if (onSuccess) { onSuccess(); } } catch (e) { if (onError) { onError(e); } } }
Itera/mad-learning
src/components/inputs/RsvpButton/RsvpButton.tsx
TypeScript
TypeAliasDeclaration
type RsvpButtonProps = { event: Event; onSuccess?: () => void; onError?: (e: Error) => void; };
Itera/mad-learning
src/components/inputs/RsvpButton/RsvpButton.tsx
TypeScript
TypeAliasDeclaration
type Ipc = { on: (k: string, handler: any) => void; invoke: <T>(k: string) => Promise<T>; send: (k: string, payload?: any) => void; };
T4rk1n/dazzler
src/electron/renderer/ipc.ts
TypeScript
ArrowFunction
(app: restify.Server, namespace: string = '') => app.post(namespace, has_auth(), has_body, mk_valid_body_mw_ignore(schema, ['id', 'username']), (request: restify.Request, res: restify.Response, next: restify.Next) => { createCategorise(request as CategoriseBodyReq) .then(categor...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(request: restify.Request, res: restify.Response, next: restify.Next) => { createCategorise(request as CategoriseBodyReq) .then(categorise => { res.json(201, categorise); return next(); }) .catch(next); }
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
categorise => { res.json(201, categorise); return next(); }
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(app: restify.Server, namespace: string = '') => app.get(namespace, has_auth(), (request: restify.Request, res: restify.Response, next: restify.Next) => { // TODO: Add query params getManyCategorise(request as unknown as Request & IOrmReq) .then(categorises => { ...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(request: restify.Request, res: restify.Response, next: restify.Next) => { // TODO: Add query params getManyCategorise(request as unknown as Request & IOrmReq) .then(categorises => { res.json({ categorises }); return next(); ...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
categorises => { res.json({ categorises }); return next(); }
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(app: restify.Server, namespace: string = '') => app.get(`${namespace}/csv`, has_auth(), (request: restify.Request, res: restify.Response, next: restify.Next) => { getAllCategorise(request as unknown as Request & IOrmReq) .then(categorises => { /*res.writeHea...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(request: restify.Request, res: restify.Response, next: restify.Next) => { getAllCategorise(request as unknown as Request & IOrmReq) .then(categorises => { /*res.writeHead(200, { 'Content-Type': 'text/csv', 'Content-Disposi...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
categorises => { /*res.writeHead(200, { 'Content-Type': 'text/csv', 'Content-Disposition': 'attachment; filename=export.csv' }); console.info('categorises:', categorises, ';');*/ const field...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(app: restify.Server, namespace: string = '') => app.get(`${namespace}/next`, has_auth(), (request: restify.Request, res: restify.Response, next: restify.Next) => { getNextArtifactByCategory(request as unknown as Request & IOrmReq & {user_id: string}) .then(artifacts => { ...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(request: restify.Request, res: restify.Response, next: restify.Next) => { getNextArtifactByCategory(request as unknown as Request & IOrmReq & {user_id: string}) .then(artifacts => { res.json({ artifacts }); return next(); }) ...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
artifacts => { res.json({ artifacts }); return next(); }
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(app: restify.Server, namespace: string = '') => app.get(`${namespace}/next_diff`, has_auth(), (request: restify.Request, res: restify.Response, next: restify.Next) => { getCategoriseDiffC(request as unknown as Request & IOrmReq & {user_id: string}) .then(artifactLocations => { ...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(request: restify.Request, res: restify.Response, next: restify.Next) => { getCategoriseDiffC(request as unknown as Request & IOrmReq & {user_id: string}) .then(artifactLocations => { res.json({ artifactLocations }); return next(); }) ...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
artifactLocations => { res.json({ artifactLocations }); return next(); }
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(app: restify.Server, namespace: string = '') => app.get(`${namespace}/stats`, has_auth(), (request: restify.Request, res: restify.Response, next: restify.Next) => { getStatsArtifactByCategory(request as unknown as Request & IOrmReq & {user_id: string}) .then(stats => { ...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(request: restify.Request, res: restify.Response, next: restify.Next) => { getStatsArtifactByCategory(request as unknown as Request & IOrmReq & {user_id: string}) .then(stats => { res.json(stats); return next(); }) .cat...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
stats => { res.json(stats); return next(); }
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(app: restify.Server, namespace: string = '') => app.get(`${namespace}/agg_stats`, has_auth(), (request: restify.Request, res: restify.Response, next: restify.Next) => { getCategoriseStats(request as unknown as Request & IOrmReq & {user_id: string}) .then(stats => { ...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(request: restify.Request, res: restify.Response, next: restify.Next) => { getCategoriseStats(request as unknown as Request & IOrmReq & {user_id: string}) .then(stats => { res.json(stats); return next(); }) .catch(next)...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(app: restify.Server, namespace: string = '') => app.get(`${namespace}/cat_diff`, has_auth(), (request: restify.Request, res: restify.Response, next: restify.Next) => { getCategoriseDiff(request as unknown as Request & IOrmReq & {user_id: string}) .then(categorise_diff => { ...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(request: restify.Request, res: restify.Response, next: restify.Next) => { getCategoriseDiff(request as unknown as Request & IOrmReq & {user_id: string}) .then(categorise_diff => { res.json(categorise_diff); return next(); }) ...
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
categorise_diff => { res.json(categorise_diff); return next(); }
healthplatform/healthplatform-nodejs-rest-api
api/categorise/routes.ts
TypeScript
ArrowFunction
(result) => { return <ResultadoDto>{ status: true, mensagem: "Usuário cadastrado com sucesso!" } }
evelynarruda/Teste
src/usuario/usuario.service.ts
TypeScript
ArrowFunction
(error) => { return <ResultadoDto>{ status: false, mensagem: "Houve um errro ao cadastrar o usuário" } }
evelynarruda/Teste
src/usuario/usuario.service.ts
TypeScript
ClassDeclaration
@Injectable() export class UsuarioService { constructor( @Inject('USUARIO_REPOSITORY') private usuarioRepository: Repository<Usuario>, ) {} async listar(): Promise<Usuario[]> { return this.usuarioRepository.find(); } async cadastrar(data: UsuarioCadastrarDto): Promise<ResultadoDto>{ let usu...
evelynarruda/Teste
src/usuario/usuario.service.ts
TypeScript
MethodDeclaration
async listar(): Promise<Usuario[]> { return this.usuarioRepository.find(); }
evelynarruda/Teste
src/usuario/usuario.service.ts
TypeScript
MethodDeclaration
async cadastrar(data: UsuarioCadastrarDto): Promise<ResultadoDto>{ let usuario = new Usuario() usuario.email = data.email usuario.nome = data.nome usuario.senha = bcrypt.hashSync(data.senha, 8) usuario.telefone = data.telefone usuario.cpf = data.cpf return this.usuarioRepository.save(usuari...
evelynarruda/Teste
src/usuario/usuario.service.ts
TypeScript
MethodDeclaration
async findOne(email: string): Promise<Usuario | undefined> { return this.usuarioRepository.findOne({email: email}); }
evelynarruda/Teste
src/usuario/usuario.service.ts
TypeScript
ArrowFunction
() => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ AppComponent ], imports: [ RouterTestingModule ], }).compileComponents(); })); it('should create the app', async(() => { const fixture = TestBed.createComponent(AppComponent); const app = f...
2Future4U/angular-multi-layout-scaffolding
src/app/app.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [ AppComponent ], imports: [ RouterTestingModule ], }).compileComponents(); }
2Future4U/angular-multi-layout-scaffolding
src/app/app.component.spec.ts
TypeScript
ArrowFunction
(i) => typesToArray[i] === obj.constructor
KGerring/ipywidgets
packages/base/test/src/dummy-manager.ts
TypeScript
ArrowFunction
(model) => { model.once('comm:close', () => { delete this._models[model_id]; }); }
KGerring/ipywidgets
packages/base/test/src/dummy-manager.ts
TypeScript
ArrowFunction
() => { delete this._models[model_id]; }
KGerring/ipywidgets
packages/base/test/src/dummy-manager.ts
TypeScript
ClassDeclaration
export class MockComm implements widgets.IClassicComm { constructor() { this.comm_id = `mock-comm-id-${numComms}`; numComms += 1; } on_open(fn: Function): void { this._on_open = fn; } on_close(fn: Function): void { this._on_close = fn; } on_msg(fn: Function): void { this._on_msg = fn;...
KGerring/ipywidgets
packages/base/test/src/dummy-manager.ts
TypeScript
ClassDeclaration
class TestWidget extends widgets.WidgetModel { defaults(): Backbone.ObjectHash { return { ...super.defaults(), _model_module: 'test-widgets', _model_name: 'TestWidget', _model_module_version: '1.0.0', _view_module: 'test-widgets', _view_name: 'TestWidgetView', _view_modu...
KGerring/ipywidgets
packages/base/test/src/dummy-manager.ts
TypeScript
ClassDeclaration
class TestWidgetView extends widgets.WidgetView { render(): void { this._rendered += 1; super.render(); } remove(): void { this._removed += 1; super.remove(); } _removed = 0; _rendered = 0; }
KGerring/ipywidgets
packages/base/test/src/dummy-manager.ts
TypeScript
ClassDeclaration
class BinaryWidget extends TestWidget { static serializers = { ...widgets.WidgetModel.serializers, array: array_serialization, }; defaults(): Backbone.ObjectHash { return { ...super.defaults(), _model_name: 'BinaryWidget', _view_name: 'BinaryWidgetView', array: new Int8Array(0...
KGerring/ipywidgets
packages/base/test/src/dummy-manager.ts
TypeScript