type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
async ({ api, store }: Ports) => {
try {
const { status, body: user } = await api.users.me.get();
store.commit("setUser", user);
return status === 200;
} catch (error) {
return false;
}
} | HosokawaR/twinte-front | src/usecases/authCheck.ts | TypeScript |
ArrowFunction |
() => {
let service: LocalStoreService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(LocalStoreService);
});
it("should be created", () => {
expect(service).toBeTruthy();
});
} | BuildForSDG/team-011-frontend | src/app/shared/services/local-store.service.spec.ts | TypeScript |
ArrowFunction |
() => {
TestBed.configureTestingModule({});
service = TestBed.inject(LocalStoreService);
} | BuildForSDG/team-011-frontend | src/app/shared/services/local-store.service.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(service).toBeTruthy();
} | BuildForSDG/team-011-frontend | src/app/shared/services/local-store.service.spec.ts | TypeScript |
ClassDeclaration |
export declare class MzTextareaPrefixDirective implements OnInit {
private elementRef;
private renderer;
constructor(elementRef: ElementRef, renderer: Renderer);
ngOnInit(): void;
} | johnwanjema/git | node_modules/ngx-materialize/src/textarea/textarea-prefix/textarea-prefix.directive.d.ts | TypeScript |
MethodDeclaration |
ngOnInit(): void; | johnwanjema/git | node_modules/ngx-materialize/src/textarea/textarea-prefix/textarea-prefix.directive.d.ts | TypeScript |
ClassDeclaration | /**
* Negative Guard validates a property is not a negative number
*/
class NegativeGuard implements Guard {
/**
* @inheritDoc
*/
public guard<T = unknown>(property: T, errorMessage?: string, error?: Instantiable<Error>): T {
Guarder.guard(NumberGuard, property, errorMessage, error)
const int = par... | ToeFungi/Guarder | src/guards/NegativeGuard.ts | TypeScript |
MethodDeclaration | /**
* @inheritDoc
*/
public guard<T = unknown>(property: T, errorMessage?: string, error?: Instantiable<Error>): T {
Guarder.guard(NumberGuard, property, errorMessage, error)
const int = parseInt(Guarder.empty(property).toString())
if (int < 0) {
this.throwError(errorMessage ?? 'Property not a... | ToeFungi/Guarder | src/guards/NegativeGuard.ts | TypeScript |
MethodDeclaration |
private throwError(message: string, error?: Instantiable<Error>): never {
if (error) {
throw new error(message)
}
throw new ArgumentError(message)
} | ToeFungi/Guarder | src/guards/NegativeGuard.ts | TypeScript |
ArrowFunction |
() => {
let service: ProductService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ProductService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
} | hackmel/ProductListAppAngularDotNet | WebClient/src/app/services/product.service.spec.ts | TypeScript |
ArrowFunction |
() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ProductService);
} | hackmel/ProductListAppAngularDotNet | WebClient/src/app/services/product.service.spec.ts | TypeScript |
ArrowFunction |
(e: MouseEvent) => {
console.log(e);
this.hello.emit({ message: 'Hello Stencil!' });
} | shingo1551/hello-event | stencil-app/src/components/app-hello/app-hello.tsx | TypeScript |
ClassDeclaration |
@Component({
tag: 'app-hello',
shadow: true,
})
export class AppHello {
@Event() hello: EventEmitter<{ message: string }>;
connectedCallback() {
console.log(this);
}
onClick = (e: MouseEvent) => {
console.log(e);
this.hello.emit({ message: 'Hello Stencil!' });
}
render() {
return (
... | shingo1551/hello-event | stencil-app/src/components/app-hello/app-hello.tsx | TypeScript |
MethodDeclaration |
connectedCallback() {
console.log(this);
} | shingo1551/hello-event | stencil-app/src/components/app-hello/app-hello.tsx | TypeScript |
MethodDeclaration |
render() {
return (
<div>
<p>Hello Stencil!</p>
<button onClick={this.onClick}>HELLO</button>
</div>
)
} | shingo1551/hello-event | stencil-app/src/components/app-hello/app-hello.tsx | TypeScript |
FunctionDeclaration |
export function setUser(user: IUser) {
return {
type: 'SET_USER',
payload: user
};
} | DanielSpasov/Cr46-Dashboard | src/app/+store/actions/userActions.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-view-summary',
templateUrl: './summary.component.html',
styleUrls: ['./summary.component.scss'],
})
export class SummaryComponent extends AbstractViewComponent<SummaryView> {
title: string;
isLoading = false;
currentAction: Action;
constructor(
private actionService: Act... | alexbarbato/octant | web/src/app/modules/shared/components/presentation/summary/summary.component.ts | TypeScript |
MethodDeclaration |
update() {
const view = this.v;
this.title = this.viewService.viewTitleAsText(view);
} | alexbarbato/octant | web/src/app/modules/shared/components/presentation/summary/summary.component.ts | TypeScript |
MethodDeclaration |
identifyItem(index: number, item: SummaryItem): string {
return `${index}-${item.header}`;
} | alexbarbato/octant | web/src/app/modules/shared/components/presentation/summary/summary.component.ts | TypeScript |
MethodDeclaration |
onPortLoad(isLoading: boolean) {
this.isLoading = isLoading;
} | alexbarbato/octant | web/src/app/modules/shared/components/presentation/summary/summary.component.ts | TypeScript |
MethodDeclaration |
setAction(action: Action) {
this.currentAction = action;
} | alexbarbato/octant | web/src/app/modules/shared/components/presentation/summary/summary.component.ts | TypeScript |
MethodDeclaration |
onActionSubmit(formGroup: FormGroup) {
if (formGroup && formGroup.value) {
this.actionService.perform(formGroup.value);
this.currentAction = undefined;
}
} | alexbarbato/octant | web/src/app/modules/shared/components/presentation/summary/summary.component.ts | TypeScript |
MethodDeclaration |
onActionCancel() {
this.currentAction = undefined;
} | alexbarbato/octant | web/src/app/modules/shared/components/presentation/summary/summary.component.ts | TypeScript |
MethodDeclaration |
shouldShowFooter(): boolean {
if (this.v && this.v.config.actions) {
if (!this.currentAction && this.v.config.actions.length > 0) {
return true;
}
}
return false;
} | alexbarbato/octant | web/src/app/modules/shared/components/presentation/summary/summary.component.ts | TypeScript |
FunctionDeclaration | /**
* Creates a function that invokes func, with the this binding and arguments of the created function, while it's called less than n times.
* Subsequent calls to the created function return the result of the last func invocation.
* @param {number} n The number of calls at whichc func is no longer invoked.
* @exam... | Cyrus-d/lodash-decorators | src/before.ts | TypeScript |
ArrowFunction |
() => {
it('enforces the presense of a `focusElement`', async () => {
iliadCustomElementsDefine('focusable-test', class extends Focusable {});
try {
const el = await fixture<Focusable>(
html`
<focusable-test></focusable-test>
`
... | gaoding-inc/Iliad-ui | packages/shared/test/focusable.test.ts | TypeScript |
ArrowFunction |
async () => {
iliadCustomElementsDefine('focusable-test', class extends Focusable {});
try {
const el = await fixture<Focusable>(
html`
<focusable-test></focusable-test>
`
);
await elementUpdated(el);
co... | gaoding-inc/Iliad-ui | packages/shared/test/focusable.test.ts | TypeScript |
ArrowFunction |
() => {
throw error;
} | gaoding-inc/Iliad-ui | packages/shared/test/focusable.test.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/status-card/status-card' /* webpackChunkName: "object-service-status-card" */
).then((m) => m.default) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
(m) => m.default | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/details-card/details-card' /* webpackChunkName: "object-service-details-card" */
).then((m) => m.DetailsCard) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
(m) => m.DetailsCard | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/buckets-card/buckets-card' /* webpackChunkName: "object-service-buckets-card" */
).then((m) => m.BucketsCard) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
(m) => m.BucketsCard | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/resource-providers-card/resource-providers-card' /* webpackChunkName: "object-service-resource-providers-card" */
).then((m) => m.ResourceProvidersCard) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
(m) => m.ResourceProvidersCard | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/data-consumption-card/data-consumption-card' /* webpackChunkName: "object-service-data-consumption-card" */
).then((m) => m.default) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/activity-card/activity-card' /* webpackChunkName: "object-service-activity-card" */
).then((m) => m.default) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/object-data-reduction-card/object-data-reduction-card' /* webpackChunkName: "object-service-data-reduction-card" */
).then((m) => m.default) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/object-bucket-page/object-bucket' /* webpackChunkName: "object-bucket-page" */
).then((m) => m.ObjectBucketsPage) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
(m) => m.ObjectBucketsPage | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/object-bucket-page/object-bucket' /* webpackChunkName: "object-bucket-page" */
).then((m) => m.ObjectBucketDetailsPage) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
(m) => m.ObjectBucketDetailsPage | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/object-bucket-claim-page/object-bucket-claim' /* webpackChunkName: "object-bucket-claim-page" */
).then((m) => m.ObjectBucketClaimsPage) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
(m) => m.ObjectBucketClaimsPage | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/object-bucket-claim-page/object-bucket-claim' /* webpackChunkName: "object-bucket-claim-page" */
).then((m) => m.ObjectBucketClaimsDetailsPage) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
(m) => m.ObjectBucketClaimsDetailsPage | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
() =>
import(
'./components/object-bucket-claim-page/create-obc' /* webpackChunkName: "create-obc" */
).then((m) => m.CreateOBCPage) | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
(m) => m.CreateOBCPage | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
TypeAliasDeclaration |
type ConsumedExtensions =
| ModelFeatureFlag
| ModelDefinition
| DashboardsTab
| DashboardsCard
| ResourceNSNavItem
| ResourceClusterNavItem
| ResourceListPage
| ResourceDetailsPage
| YAMLTemplate
| RoutePage; | abhi-kn/console | frontend/packages/noobaa-storage-plugin/src/plugin.ts | TypeScript |
ArrowFunction |
async () => {
// When loading Lish we avoid all this extra data loading
if (window.location?.pathname?.match(/linodes\/[0-9]+\/lish/)) {
return;
}
// Initial Requests: Things we need immediately (before rendering the app)
const dataFetchingPromises: Promise<any>[] = [
// Fetch user's a... | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
async () => {
try {
await Promise.all([
this.props.requestTypes(),
this.props.requestNotifications(),
]);
} catch {
/** We choose to do nothing, relying on the Redux error state. */
}
} | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
() => {
const { linodes, types } = this.props;
// The types we already know about (from /types and /types-legacy).
const knownTypeIds = types.map((thisType) => thisType.id);
// The types of each Linode on the account.
const linodeTypeIds = uniqBy((thisLinode) => thisLinode.type, linodes).map(
... | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
(thisType) => thisType.id | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
(thisLinode) => thisLinode.type | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
(thisMissingTypeId) => {
if (thisMissingTypeId !== null) {
this.props.requestLinodeType({
typeId: thisMissingTypeId,
isShadowPlan: true,
});
}
} | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
(state) => ({
isAuthenticated: Boolean(state.authentication.token),
linodesLoading: state.__resources.linodes.loading,
linodesLastUpdated: state.__resources.linodes.lastUpdated,
linodes: Object.values(state.__resources.linodes.itemsById),
pendingUpload: state.pendingUpload,
types: state.__resources.types.e... | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
(
dispatch: ThunkDispatch<ApplicationState, undefined, Action<any>>
) => ({
initSession: () => dispatch(handleInitTokens()),
checkAccountSize: () => dispatch(checkAccountSize()),
requestLinodes: () => dispatch(requestLinodes({})),
requestNotifications: () => dispatch(requestNotifications()),
requestTypes: ... | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
() => dispatch(handleInitTokens()) | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
() => dispatch(checkAccountSize()) | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
() => dispatch(requestLinodes({})) | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
() => dispatch(requestNotifications()) | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
() => dispatch(requestTypes()) | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
() => dispatch(requestRegions()) | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
() => dispatch(requestProfile()) | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
() => dispatch(handleLoadingDone()) | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ArrowFunction |
(options) => dispatch(requestLinodeType(options)) | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
ClassDeclaration |
export class AuthenticationWrapper extends React.Component<CombinedProps> {
state = {
showChildren: false,
hasEnsuredAllTypes: false,
};
static defaultProps = {
isAuthenticated: false,
};
/**
* We make a series of requests for data on app load. The flow is:
* 1. App begins load; users see... | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
InterfaceDeclaration |
interface StateProps {
isAuthenticated: boolean;
linodesLoading: boolean;
linodesLastUpdated: number;
linodes: Linode[];
pendingUpload: PendingUploadState;
types: LinodeType[];
typesLastUpdated: number;
} | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
InterfaceDeclaration |
interface DispatchProps {
initSession: () => void;
checkAccountSize: () => Promise<null>;
requestLinodes: () => Promise<GetAllData<Linode>>;
requestNotifications: () => Promise<GetAllData<Notification>>;
requestTypes: () => Promise<LinodeType[]>;
requestRegions: () => Promise<Region[]>;
requestProfile: (... | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
TypeAliasDeclaration |
type CombinedProps = DispatchProps & StateProps; | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
MethodDeclaration |
componentDidMount() {
const { initSession } = this.props;
/**
* set redux state to what's in local storage
* or expire the tokens if the expiry time is in the past
*
* if nothing exists in local storage, we get shot off to login
*/
initSession();
/**
* this is the case wh... | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
MethodDeclaration | /**
* handles for the case where we've refreshed the page
* and redux has now been synced with what is in local storage
*/
componentDidUpdate(prevProps: CombinedProps) {
/** if we were previously not authenticated and now we are */
if (
!prevProps.isAuthenticated &&
this.props.isAuthenticat... | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
MethodDeclaration |
render() {
const { children } = this.props;
const { showChildren } = this.state;
// eslint-disable-next-line
return <React.Fragment>{showChildren ? children : null}</React.Fragment>;
} | tjdawson/manager | packages/manager/src/components/AuthenticationWrapper/AuthenticationWrapper.tsx | TypeScript |
FunctionDeclaration |
function View_Checkbox_1(_l:any):i0.ɵViewDefinition {
return i0.ɵvid(0,[(_l()(),i0.ɵeld(0,(null as any),(null as any),3,'label',[['class',
'ui-chkbox-label']],[[1,'for',0]],[[(null as any),'click']],(_v,en,$event) => {
var ad:boolean = true;
var _co:any = _v.component;
if (('click' === en)) {
... | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
FunctionDeclaration |
export function View_Checkbox_0(_l:any):i0.ɵViewDefinition {
return i0.ɵvid(0,[(_l()(),i0.ɵted((null as any),['\n '])),(_l()(),i0.ɵeld(0,
(null as any),(null as any),19,'div',([] as any[]),(null as any),(null as any),
(null as any),(null as any),(null as any))),i0.ɵdid(278528,(null as any),0,i2.Ng... | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
FunctionDeclaration |
export function View_Checkbox_Host_0(_l:any):i0.ɵViewDefinition {
return i0.ɵvid(0,[(_l()(),i0.ɵeld(0,(null as any),(null as any),2,'p-checkbox',([] as any[]),
(null as any),(null as any),(null as any),View_Checkbox_0,RenderType_Checkbox)),
i0.ɵprd(5120,(null as any),i3.NG_VALUE_ACCESSOR,(p0_0:any) => {
... | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
ArrowFunction |
(_l:any) => {
return i0.ɵmod([i0.ɵmpd(512,i0.ComponentFactoryResolver,i0.ɵCodegenComponentFactoryResolver,
[[8,([] as any[])],[3,i0.ComponentFactoryResolver],i0.NgModuleRef]),i0.ɵmpd(4608,
i2.NgLocalization,i2.NgLocaleLocalization,[i0.LOCALE_ID]),i0.ɵmpd(512,i2.CommonModule,
i2.Comm... | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
ArrowFunction |
(_v,en,$event) => {
var ad:boolean = true;
var _co:any = _v.component;
if (('click' === en)) {
const pd_0:any = ((<any>_co.onClick($event,i0.ɵnov((<any>_v.parent),7),true)) !== false);
ad = (pd_0 && ad);
}
return ad;
} | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
ArrowFunction |
(_ck,_v) => {
var _co:any = _v.component;
const currVal_1:any = 'ui-chkbox-label';
const currVal_2:any = _ck(_v,2,0,_co.checked,_co.disabled,_co.focused);
_ck(_v,1,0,currVal_1,currVal_2);
} | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
ArrowFunction |
(_ck,_v) => {
var _co:any = _v.component;
const currVal_0:any = _co.inputId;
_ck(_v,0,0,currVal_0);
const currVal_3:any = _co.label;
_ck(_v,3,0,currVal_3);
} | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
ArrowFunction |
(_v,en,$event) => {
var ad:boolean = true;
var _co:i1.Checkbox = _v.component;
if (('focus' === en)) {
const pd_0:any = ((<any>_co.onFocus($event)) !== false);
ad = (pd_0 && ad);
}
if (('blur' === en)) {
const pd_1:any = ((<any>_co.onBlur($event)) !... | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
ArrowFunction |
(_v,en,$event) => {
var ad:boolean = true;
var _co:i1.Checkbox = _v.component;
if (('click' === en)) {
const pd_0:any = ((<any>_co.onClick($event,i0.ɵnov(_v,7),true)) !== false);
ad = (pd_0 && ad);
}
return ad;
} | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
ArrowFunction |
(_ck,
_v) => {
var _co:i1.Checkbox = _v.component;
const currVal_0:any = _co.styleClass;
const currVal_1:any = 'ui-chkbox ui-widget';
_ck(_v,2,0,currVal_0,currVal_1);
const currVal_2:any = _co.style;
_ck(_v,3,0,currVal_2);
const currVal_9:any = _ck(_v,9,0,_co.focused);
_ck(_v,8,0,... | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
ArrowFunction |
(_ck,_v) => {
var _co:i1.Checkbox = _v.component;
const currVal_3:any = _co.inputId;
const currVal_4:any = _co.name;
const currVal_5:any = _co.value;
const currVal_6:any = _co.checked;
const currVal_7:any = _co.disabled;
const currVal_8:any = _co.tabindex;
_ck(_v,7,0,currVal_3,currVal_4... | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
ArrowFunction |
(p0_0:any) => {
return [p0_0];
} | kjetilfjellheim/wordcup | frontend/src/aot/node_modules/primeng/components/checkbox/checkbox.ngfactory.ts | TypeScript |
ClassDeclaration |
export default class RecipeImplementation implements RecipeInterface {
recipeImplementation: ThirdPartyEmailPasswordRecipeInterface;
constructor(recipeImplementation: ThirdPartyEmailPasswordRecipeInterface);
signUp: ({
email,
password,
}: {
email: string;
password: strin... | jscyo/supertokens-node | lib/build/recipe/thirdpartyemailpassword/recipeImplementation/emailPasswordRecipeImplementation.d.ts | TypeScript |
FunctionDeclaration |
export function assertIsArray(input: any): asserts input is Array<any> {
if (!Array.isArray(input)) throw new AssertionError(`${input} is not Array.`)
} | Aleksan107/LbrX | spec/__test__/functions/assert-is-array.ts | TypeScript |
ArrowFunction |
() => {
return useContext(AccessTokenContext);
} | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
ArrowFunction |
({
children,
}: {
children: ReactNode;
}) => {
//#region Access token management -------------------------------------------
const [accessToken, setAccessToken] = useState("");
const [authenticated, setAuthenticated] = useState(false);
/**
* Automatically set access token in Auth header and enable cook... | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
ArrowFunction |
(value: string): void => {
setAccessToken(value);
} | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
ArrowFunction |
() => {
if (accessToken) {
setAuthenticated(true);
} else {
setAuthenticated(false);
}
} | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
ArrowFunction |
async () => {
await axios
.post(`${process.env.REACT_APP_BACKEND_URI}/users/logout`, {})
.then((res) => {
setAccessToken("");
window.location.reload();
})
.catch((error) => {
console.log(error);
});
} | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
ArrowFunction |
(res) => {
setAccessToken("");
window.location.reload();
} | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
ArrowFunction |
(error) => {
console.log(error);
} | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
ArrowFunction |
async () => {
setLoading(true);
await axios
.post(`${process.env.REACT_APP_BACKEND_URI}/users/refresh`)
.then((res) => {
if (res.status === 200) {
login(res.data.accessToken);
} else {
logout();
}
})
.catch((error) => {
// console.log(... | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
ArrowFunction |
(res) => {
if (res.status === 200) {
login(res.data.accessToken);
} else {
logout();
}
} | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
ArrowFunction |
(error) => {
// console.log(error);
} | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
ArrowFunction |
() => {
renewTokensMutation();
setInterval(renewTokensMutation, 870000);
} | sirpaulmcd/Task-App | frontend/src/shared/contexts/AccessTokenContext.tsx | TypeScript |
FunctionDeclaration |
function listToString(list: Array<string>, indentLevel: number) {
const space = " ".repeat(indentLevel * 2)
return list.join(`\n${space}`)
} | Eshva/electron-builder | packages/app-builder-lib/src/targets/MsiTarget.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.