type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
deploy(
_MASTER_CHEF_V2: string,
_joe: string,
_MASTER_PID: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<MasterChefJoeV3> {
return super.deploy(
_MASTER_CHEF_V2,
_joe,
_MASTER_PID,
overrides || {}
) as Promise<MasterChefJoeV3>;
... | vulturefi/vulturefi.github.io | types/ethers-contracts/factories/MasterChefJoeV3__factory.ts | TypeScript |
MethodDeclaration |
getDeployTransaction(
_MASTER_CHEF_V2: string,
_joe: string,
_MASTER_PID: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): TransactionRequest {
return super.getDeployTransaction(
_MASTER_CHEF_V2,
_joe,
_MASTER_PID,
overrides || {}
);
} | vulturefi/vulturefi.github.io | types/ethers-contracts/factories/MasterChefJoeV3__factory.ts | TypeScript |
MethodDeclaration |
attach(address: string): MasterChefJoeV3 {
return super.attach(address) as MasterChefJoeV3;
} | vulturefi/vulturefi.github.io | types/ethers-contracts/factories/MasterChefJoeV3__factory.ts | TypeScript |
MethodDeclaration |
connect(signer: Signer): MasterChefJoeV3__factory {
return super.connect(signer) as MasterChefJoeV3__factory;
} | vulturefi/vulturefi.github.io | types/ethers-contracts/factories/MasterChefJoeV3__factory.ts | TypeScript |
MethodDeclaration |
static createInterface(): MasterChefJoeV3Interface {
return new utils.Interface(_abi) as MasterChefJoeV3Interface;
} | vulturefi/vulturefi.github.io | types/ethers-contracts/factories/MasterChefJoeV3__factory.ts | TypeScript |
MethodDeclaration |
static connect(
address: string,
signerOrProvider: Signer | Provider
): MasterChefJoeV3 {
return new Contract(address, _abi, signerOrProvider) as MasterChefJoeV3;
} | vulturefi/vulturefi.github.io | types/ethers-contracts/factories/MasterChefJoeV3__factory.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
title = 'ngxtend-fire-testing-demo';
} | angularx/fire-testing | src/app/app.component.ts | TypeScript |
ArrowFunction |
(response: any) => {
if (response) {
const dataResponse = {
token: response.access_token,
userName: loginData.userName,
refreshToken: response.refresh_token,
useRefreshTokens: true,
roles: response.roles.split(','),
... | Fakiu2020/APFL | .history/src/app/views/shared/services/auth.service_20210312114746.ts | TypeScript |
ClassDeclaration |
@Injectable({
providedIn: 'root',
})
export class AuthService {
baseApiUrl = environment.baseUrl + 'token';
authentication = new Authentication();
constructor(private http: HttpClient, private router: Router ) {
this.authentication = JSON.parse(localStorage.getItem('authorizationData'));
}
logOut() {... | Fakiu2020/APFL | .history/src/app/views/shared/services/auth.service_20210312114746.ts | TypeScript |
MethodDeclaration |
logOut() {
localStorage.setItem('authorizationData', JSON.stringify({}));
this.authentication = new Authentication();
} | Fakiu2020/APFL | .history/src/app/views/shared/services/auth.service_20210312114746.ts | TypeScript |
MethodDeclaration |
login(loginData) {
const data = 'grant_type=password&username=' + encodeURIComponent(loginData.userName) +
'&password=' + loginData.password +
'&deviceToken=' + loginData.deviceToken +
'&deviceModel=' + loginData.deviceModel +
'&devicePlatform=' + loginData.devicePlatform +
'&client_i... | Fakiu2020/APFL | .history/src/app/views/shared/services/auth.service_20210312114746.ts | TypeScript |
MethodDeclaration |
isAuthenticated(){
return this.authentication.token != null ;
} | Fakiu2020/APFL | .history/src/app/views/shared/services/auth.service_20210312114746.ts | TypeScript |
ArrowFunction |
() => {
const [amountToBurn, onBurnChange] = useRecoilState(amountToBurnState);
const [burnType, onBurnTypeChange] = useRecoilState(burnTypeState);
const {
useSynthsBalancesQuery,
useETHBalanceQuery,
useSynthetixTxn,
useEVMTxn,
} = useSynthetixQueries();
const {
percentageTargetCRatio,
debtBalance,
... | metaplacebsc/staking | sections/staking/hooks/useBurnTx.ts | TypeScript |
ArrowFunction |
async () => {
const {
contracts: { Exchanger },
utils: { formatBytes32String },
} = synthetixjs!;
try {
const maxSecsLeftInWaitingPeriod = await Exchanger.maxSecsLeftInWaitingPeriod(
delegateWallet?.address ?? walletAddress,
formatBytes32String('sUSD')
);
setWaitingPeriod(Number(maxSecsLe... | metaplacebsc/staking | sections/staking/hooks/useBurnTx.ts | TypeScript |
ArrowFunction |
async () => {
const {
contracts: { Issuer },
} = synthetixjs!;
try {
const [canBurnSynths, lastIssueEvent, minimumStakeTime] = await Promise.all([
Issuer.canBurnSynths(delegateWallet?.address ?? walletAddress),
Issuer.lastIssueEvent(delegateWallet?.address ?? walletAddress),
Issuer.minimumStake... | metaplacebsc/staking | sections/staking/hooks/useBurnTx.ts | TypeScript |
ArrowFunction |
() => txn.mutate() | metaplacebsc/staking | sections/staking/hooks/useBurnTx.ts | TypeScript |
ArrowFunction |
() => {
if (swapTxn.txnStatus === 'prompting' || txn.txnStatus === 'prompting') setTxModalOpen(true);
} | metaplacebsc/staking | sections/staking/hooks/useBurnTx.ts | TypeScript |
ArrowFunction |
() => {
getMaxSecsLeftInWaitingPeriod();
getIssuanceDelay();
} | metaplacebsc/staking | sections/staking/hooks/useBurnTx.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'aio-lazy-ce',
template: '',
})
export class LazyCustomElementComponent implements OnInit {
@Input() selector = '';
constructor(
private elementRef: ElementRef,
private elementsLoader: ElementsLoader,
private logger: Logger,
) {}
ngOnInit() {
... | wernert/platform | projects/ngrx.io/src/app/custom-elements/lazy-custom-element.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
if (!this.selector || /[^\w-]/.test(this.selector)) {
this.logger.error(new Error(`Invalid selector for 'aio-lazy-ce': ${this.selector}`));
return;
}
this.elementRef.nativeElement.innerHTML = `<${this.selector}></${this.selector}>`;
this.elementsLoa... | wernert/platform | projects/ngrx.io/src/app/custom-elements/lazy-custom-element.component.ts | TypeScript |
FunctionDeclaration | /**
* @description Creates a custom element class based on an Angular component.
*
* Builds a class that encapsulates the functionality of the provided component and
* uses the configuration information to provide more context to the class.
* Takes the component factory's inputs and outputs to convert them to the... | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
ArrowFunction |
e => {
const customEvent = createCustomEvent(this.ownerDocument !, e.name, e.value);
this.dispatchEvent(customEvent);
} | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
ArrowFunction |
({propName}) => propName | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
ArrowFunction |
property => {
Object.defineProperty(NgElementImpl.prototype, property, {
get: function() { return this.ngElementStrategy.getInputValue(property); },
set: function(newValue: any) { this.ngElementStrategy.setInputValue(property, newValue); },
configurable: true,
enumerable: true,
});
} | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
ClassDeclaration | /**
* Implements the functionality needed for a custom element.
*
* @publicApi
*/
export abstract class NgElement extends HTMLElement {
/**
* The strategy that controls how a component is transformed in a custom element.
*/
// TODO(issue/24571): remove '!'.
protected ngElementStrategy !: NgElementStrate... | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
ClassDeclaration |
class NgElementImpl extends NgElement {
// Work around a bug in closure typed optimizations(b/79557487) where it is not honoring static
// field externs. So using quoted access to explicitly prevent renaming.
static readonly['observedAttributes'] = Object.keys(attributeToPropertyInputs);
constructor(i... | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
InterfaceDeclaration | /**
* Prototype for a class constructor based on an Angular component
* that can be used for custom element registration. Implemented and returned
* by the {@link createCustomElement createCustomElement() function}.
*
* @publicApi
*/
export interface NgElementConstructor<P> {
/**
* An array of observed attri... | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
InterfaceDeclaration | /**
* A configuration that initializes an NgElementConstructor with the
* dependencies and strategy it needs to transform a component into
* a custom element class.
*
* @publicApi
*/
export interface NgElementConfig {
/**
* The injector to use for retrieving the component's factory.
*/
injector: Injecto... | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
TypeAliasDeclaration | /**
* Additional type information that can be added to the NgElement class,
* for properties that are added based
* on the inputs and methods of the underlying component.
*
* @publicApi
*/
export type WithProperties<P> = {
[property in keyof P]: P[property]
}; | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
MethodDeclaration | /**
* Prototype for a handler that responds to a change in an observed attribute.
* @param attrName The name of the attribute that has changed.
* @param oldValue The previous value of the attribute.
* @param newValue The new value of the attribute.
* @param namespace The namespace in which the attri... | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
MethodDeclaration | /**
* Prototype for a handler that responds to the insertion of the custom element in the DOM.
* @returns Nothing.
*/
abstract connectedCallback(): void; | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
MethodDeclaration | /**
* Prototype for a handler that responds to the deletion of the custom element from the DOM.
* @returns Nothing.
*/
abstract disconnectedCallback(): void; | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
MethodDeclaration |
attributeChangedCallback(
attrName: string, oldValue: string|null, newValue: string, namespace?: string): void {
if (!this.ngElementStrategy) {
this.ngElementStrategy = strategyFactory.create(config.injector);
}
const propName = attributeToPropertyInputs[attrName] !;
this.ngEle... | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
MethodDeclaration |
connectedCallback(): void {
if (!this.ngElementStrategy) {
this.ngElementStrategy = strategyFactory.create(config.injector);
}
this.ngElementStrategy.connect(this);
// Listen for events from the strategy and dispatch them as custom events
this.ngElementEventsSubscription = this.... | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
MethodDeclaration |
disconnectedCallback(): void {
if (this.ngElementStrategy) {
this.ngElementStrategy.disconnect();
}
if (this.ngElementEventsSubscription) {
this.ngElementEventsSubscription.unsubscribe();
this.ngElementEventsSubscription = null;
}
} | AntoinePoree/Angular | packages/elements/src/create-custom-element.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'modals',
styles: [require('./modals.scss')],
template: require('./modals.html')
})
export class Modals {
@ViewChild('childModal') childModal: ModalDirective;
showChildModal(): void {
this.childModal.show();
}
hideChildModal(): void {
this.childModal.hide();
... | vaishalijain45/ng2-admin | src/app/pages/ui/components/modals/modals.component.ts | TypeScript |
MethodDeclaration |
showChildModal(): void {
this.childModal.show();
} | vaishalijain45/ng2-admin | src/app/pages/ui/components/modals/modals.component.ts | TypeScript |
MethodDeclaration |
hideChildModal(): void {
this.childModal.hide();
} | vaishalijain45/ng2-admin | src/app/pages/ui/components/modals/modals.component.ts | TypeScript |
FunctionDeclaration |
function Demo() {
return (
<Grid>
<Col span={4}>1</Col>
<Col span={4}>2</Col>
<Col span={4}>3</Col>
</Grid>
);
} | Anishpras/mantine | src/mantine-demos/src/demos/packages/Grid/usage.tsx | TypeScript |
ArrowFunction |
async (req: Request) => {
// Initializing Response:
let response = initResponse(req);
// Fetching Response Data:
if(response.status === 'ok') {
try {
let wallet = req.query.address as Address;
response.data.push(...(await getPoolBalances(wallet)));
} catch(err: any) {
console.error(... | BoujeFi/cookietrack-api | functions/src/routes/fantom/bouje.ts | TypeScript |
ArrowFunction |
async (wallet: Address) => {
let balances: (Token | LPToken)[] = [];
let poolCount = parseInt(await query(chain, masterChef, bouje.masterChefABI, 'poolLength', []));
let poolList = [...Array(poolCount).keys()];
let promises = poolList.map(poolID => (async () => {
let balance = parseInt((await query(chain, ... | BoujeFi/cookietrack-api | functions/src/routes/fantom/bouje.ts | TypeScript |
ArrowFunction |
poolID => (async () => {
let balance = parseInt((await query(chain, masterChef, bouje.masterChefABI, 'userInfo', [poolID, wallet])).amount);
if(balance > 0) {
let token = (await query(chain, masterChef, bouje.masterChefABI, 'poolInfo', [poolID])).lpToken;
let symbol = await query(chain, token, minA... | BoujeFi/cookietrack-api | functions/src/routes/fantom/bouje.ts | TypeScript |
ArrowFunction |
async () => {
let balance = parseInt((await query(chain, masterChef, bouje.masterChefABI, 'userInfo', [poolID, wallet])).amount);
if(balance > 0) {
let token = (await query(chain, masterChef, bouje.masterChefABI, 'poolInfo', [poolID])).lpToken;
let symbol = await query(chain, token, minABI, 'symbol... | BoujeFi/cookietrack-api | functions/src/routes/fantom/bouje.ts | TypeScript |
ArrowFunction | //@ts-ignore
(item: keyof typeof variables) => variables[item] || item | newbornfrontender/effector | src/types/src/generator/sampleArrayTargetCombinable.generator.ts | TypeScript |
ArrowFunction |
failCase => !target.includes(failCase) | newbornfrontender/effector | src/types/src/generator/sampleArrayTargetCombinable.generator.ts | TypeScript |
ArrowFunction |
(cur: any) =>
`${cur.sourceDescription} ${cur.fn ? cur.fnDescription : ''}` | newbornfrontender/effector | src/types/src/generator/sampleArrayTargetCombinable.generator.ts | TypeScript |
ArrowFunction |
(cur: any) =>
`source:${cur.sourceDescription}${
cur.fn ? `, fn:${cur.fnDescription}` : ''
}` | newbornfrontender/effector | src/types/src/generator/sampleArrayTargetCombinable.generator.ts | TypeScript |
MethodDeclaration |
fn({target}) {
return target.map(
//@ts-ignore
(item: keyof typeof variables) => variables[item] || item,
)
} | newbornfrontender/effector | src/types/src/generator/sampleArrayTargetCombinable.generator.ts | TypeScript |
MethodDeclaration |
fn({noFalsePositive, fn, target, source}) {
if (noFalsePositive) return false
if (fn) return failCases.ab.every(failCase => !target.includes(failCase))
return failCases[source as keyof typeof failCases].every(
failCase => !target.includes(failCase),
)
} | newbornfrontender/effector | src/types/src/generator/sampleArrayTargetCombinable.generator.ts | TypeScript |
ArrowFunction |
({ deselectElement, isWriteable }) => {
const interactivePageLayout = useRef<CommitFn | null>(null); // future versions may enable editing on multiple pages => use array then
const registerLayout = (newLayout: CommitFn) => {
if (interactivePageLayout.current !== newLayout) {
interactivePageLayout.curren... | AlexanderWert/kibana | x-pack/plugins/canvas/public/apps/workpad/workpad_app/workpad_app.component.tsx | TypeScript |
ArrowFunction |
(newLayout: CommitFn) => {
if (interactivePageLayout.current !== newLayout) {
interactivePageLayout.current = newLayout;
}
} | AlexanderWert/kibana | x-pack/plugins/canvas/public/apps/workpad/workpad_app/workpad_app.component.tsx | TypeScript |
ArrowFunction |
(oldLayout: CommitFn) => {
if (interactivePageLayout.current === oldLayout) {
interactivePageLayout.current = null;
}
} | AlexanderWert/kibana | x-pack/plugins/canvas/public/apps/workpad/workpad_app/workpad_app.component.tsx | TypeScript |
InterfaceDeclaration |
interface Props {
deselectElement?: MouseEventHandler;
isWriteable: boolean;
} | AlexanderWert/kibana | x-pack/plugins/canvas/public/apps/workpad/workpad_app/workpad_app.component.tsx | TypeScript |
MethodDeclaration |
enter(path: Path): TransformExitResult {
const {node} = path;
if (node.type === 'BinaryExpression' && (node.operator === 'in' ||
node.operator ===
'instanceof') && node.left.type === 'UnaryExpression' &&
node.left.operator ===
'!') {
return path.context.addFix... | jeremyBanks/rome | packages/@romejs/js-compiler/transforms/lint/unsafeNegation.ts | TypeScript |
ArrowFunction |
async connection => {
const app = express();
app.use(express.json());
app.use(cors());
app.use(morgan('dev'));
// prettier-ignore
const registerRoute = (route: IRoute) => {
(app as any)[route.method](route.route, (req: Request, res: Response, next: NextFunction) => {
const... | dfireBird/curlew | src/index.ts | TypeScript |
ArrowFunction |
(route: IRoute) => {
(app as any)[route.method](route.route, (req: Request, res: Response, next: NextFunction) => {
const result = (new (route.controller as any))[route.action](req, res, next);
if (result instanceof Promise) {
result.then(result => result !== null && res... | dfireBird/curlew | src/index.ts | TypeScript |
ArrowFunction |
(req: Request, res: Response, next: NextFunction) => {
const result = (new (route.controller as any))[route.action](req, res, next);
if (result instanceof Promise) {
result.then(result => result !== null && result !== undefined ? res.send(result) : undefined);
} els... | dfireBird/curlew | src/index.ts | TypeScript |
ArrowFunction |
result => result !== null && result !== undefined ? res.send(result) : undefined | dfireBird/curlew | src/index.ts | TypeScript |
InterfaceDeclaration |
interface Request {
authenticatedUser?: { id: number }
} | damian-git-99/rest-api-typescript-jest | src/types/types.d.ts | TypeScript |
ArrowFunction |
async (Req: Request, res: Response, next: NextFunction) => {
try {
let resyncTx = Container.get(ResyncTx);
const data = await resyncTx.run({txid: Req.params.txid});
sendResponseWrapper(Req, res, 200, data.result);
} catch (error) {
next(error);
}
} | galt-tr/TXQ | src/api/v1/tx/index.ts | TypeScript |
ArrowFunction |
async (Req: Request, res: Response, next: NextFunction) => {
try {
let syncTxStatus = Container.get(SyncTxStatus);
let data = await syncTxStatus.run({ txid: Req.params.txid });
sendResponseWrapper(Req, res, 200, data.result);
} catch (error) {
if (error instanceo... | galt-tr/TXQ | src/api/v1/tx/index.ts | TypeScript |
ArrowFunction |
async (Req: Request, res: Response, next: NextFunction) => {
try {
let getTxsForSync = Container.get(GetTxsForSync);
let data = await getTxsForSync.run();
sendResponseWrapper(Req, res, 200, data.result);
} catch (error) {
next(error);
}
} | galt-tr/TXQ | src/api/v1/tx/index.ts | TypeScript |
ArrowFunction |
async (Req: Request, res: Response, next: NextFunction) => {
try {
let getTx = Container.get(GetTx);
let data = await getTx.run({ txid: Req.params.txid, channel: null, rawtx: Req.query.rawtx === '0' ? false : true });
sendResponseWrapper(Req, res, 200, data.result);
} catc... | galt-tr/TXQ | src/api/v1/tx/index.ts | TypeScript |
ArrowFunction |
async (Req: Request, res: Response, next: NextFunction) => {
try {
let getTx = Container.get(GetTx);
let data = await getTx.run({ txid: Req.params.txid, channel: Req.params.channel, rawtx: Req.query.rawtx === '0' ? false : true });
sendResponseWrapper(Req, res, 200, data.result);
... | galt-tr/TXQ | src/api/v1/tx/index.ts | TypeScript |
ArrowFunction |
async (Req: Request, res: Response, next: NextFunction) => {
try {
let getTx = Container.get(GetTx);
let data = await getTx.run({ txid: Req.params.txid, rawtx: Req.query.rawtx === '0' ? false : true });
sendResponseWrapper(Req, res, 200, data.result);
} catch (error) {
... | galt-tr/TXQ | src/api/v1/tx/index.ts | TypeScript |
ArrowFunction |
async (Req: Request, res: Response, next: NextFunction) => {
try {
let saveTxs = Container.get(SaveTxs);
let data = await saveTxs.run({
channel: Req.body.channel,
set: Req.body.set
});
sendResponseWrapper(Req, res, 200, data.result);
} cat... | galt-tr/TXQ | src/api/v1/tx/index.ts | TypeScript |
FunctionDeclaration |
function buildEventsWithoutIds(): EventInput[] {
return [
{ title: 'event zero', start: '2014-06-24', className: 'event-zero' },
{ title: 'event one', start: '2014-06-24', className: 'event-non-zero event-one' },
{ title: 'event two', start: '2014-06-24', className: 'event-non-zero event-two' },
... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
FunctionDeclaration |
function buildEventsWithIds() {
let events = buildEventsWithoutIds()
let i
for (i = 0; i < events.length; i += 1) {
events[i].id = i
}
return events
} | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
FunctionDeclaration | // Verifies the actions in removeFunc executed correctly by calling checkFunc.
function go(events, removeFunc, checkFunc, doneFunc) {
initCalendar({
events,
})
checkAllEvents() // make sure all events initially rendered correctly
removeFunc() // remove the events
setTimeout(() => { // because... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
FunctionDeclaration | // Checks to make sure all events have been rendered and that the calendar
// has internal info on all the events.
function checkAllEvents() {
expect(currentCalendar.getEvents().length).toEqual(3)
let calendarWrapper = new CalendarWrapper(currentCalendar)
expect(calendarWrapper.getEventEls().length).toEqual... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
pushOptions({
initialDate: '2014-06-24',
initialView: 'dayGridMonth',
})
function buildEventsWithoutIds(): EventInput[] {
return [
{ title: 'event zero', start: '2014-06-24', className: 'event-zero' },
{ title: 'event one', start: '2014-06-24', className: 'event-non-zero event-on... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
(desc, eventGenerator) => {
describe(desc, () => {
it('can remove all events if no args specified', (done) => {
go(
eventGenerator(),
() => {
currentCalendar.removeAllEvents()
},
() => {
expect(currentCalendar.getEvents().length).toEqual... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
it('can remove all events if no args specified', (done) => {
go(
eventGenerator(),
() => {
currentCalendar.removeAllEvents()
},
() => {
expect(currentCalendar.getEvents().length).toEqual(0)
let calendarWrapper = new Calen... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
(done) => {
go(
eventGenerator(),
() => {
currentCalendar.removeAllEvents()
},
() => {
expect(currentCalendar.getEvents().length).toEqual(0)
let calendarWrapper = new CalendarWrapper(currentCalendar)
expect(calendarWrapper.... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
currentCalendar.removeAllEvents()
} | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
expect(currentCalendar.getEvents().length).toEqual(0)
let calendarWrapper = new CalendarWrapper(currentCalendar)
expect(calendarWrapper.getEventEls().length).toEqual(0)
} | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
(done) => {
go(
eventGenerator(),
() => {
currentCalendar.getEvents().forEach((event) => {
if ($.inArray('event-one', event.classNames) !== -1) {
event.remove()
}
})
},
() => {
expect(current... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
currentCalendar.getEvents().forEach((event) => {
if ($.inArray('event-one', event.classNames) !== -1) {
event.remove()
}
})
} | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
(event) => {
if ($.inArray('event-one', event.classNames) !== -1) {
event.remove()
}
} | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
expect(currentCalendar.getEvents().length).toEqual(2)
let calendarWrapper = new CalendarWrapper(currentCalendar)
expect(calendarWrapper.getEventEls().length).toEqual(2)
expect($('.event-zero').length).toEqual(1)
expect($('.event-two').length).toEqual(... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
(done) => {
go(
buildEventsWithIds(),
() => {
currentCalendar.getEventById(1 as any).remove()
},
() => {
expect(currentCalendar.getEvents().length).toEqual(2)
let calendarWrapper = new CalendarWrapper(currentCalendar)
expect(calendarWrapper.getEventEls().leng... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
currentCalendar.getEventById(1 as any).remove()
} | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
expect(currentCalendar.getEvents().length).toEqual(2)
let calendarWrapper = new CalendarWrapper(currentCalendar)
expect(calendarWrapper.getEventEls().length).toEqual(2)
expect($('.event-zero').length).toEqual(1)
expect($('.event-two').length).toEqual(1)
} | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
(done) => {
go(
buildEventsWithIds(),
() => {
currentCalendar.getEventById('1').remove()
},
() => {
expect(currentCalendar.getEvents().length).toEqual(2)
let calendarWrapper = new CalendarWrapper(currentCalendar)
expect(calendarWrapper.getEventEls().length).t... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
currentCalendar.getEventById('1').remove()
} | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
(done) => { // for issue 2082
go(
buildEventsWithIds(),
() => {
currentCalendar.getEventById(0 as any).remove()
},
() => {
expect(currentCalendar.getEvents().length).toEqual(2)
let calendarWrapper = new CalendarWrapper(currentCalendar)
expect(calendarWrapper.... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
currentCalendar.getEventById(0 as any).remove()
} | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => {
expect(currentCalendar.getEvents().length).toEqual(2)
let calendarWrapper = new CalendarWrapper(currentCalendar)
expect(calendarWrapper.getEventEls().length).toEqual(2)
expect($('.event-zero').length).toEqual(0)
expect($('.event-non-zero').length).toEqual(2)
} | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
ArrowFunction |
() => { // because the event rerender will be queued because we're a level deep
checkFunc() // check correctness
// move the calendar back out of view, then back in
currentCalendar.next()
currentCalendar.prev()
// array event sources should maintain the same state
// whereas "dyna... | aleksandr-erin/fullcalendar | packages/__tests__/src/legacy/removeEvents.ts | TypeScript |
InterfaceDeclaration | // Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/fd5dc234aaa7c6ea536baa5596877637a3bad2bf/numeral/index.d.ts
interface NumeralJSLocale {
delimiters: {
thousands: string;
decimal: string;
};
abbreviations: {
thousand: string;
million: string;
billion: stri... | Ariadna-Software/asw_sii_aeat | typings/globals/numeral/index.d.ts | TypeScript |
InterfaceDeclaration | // http://numeraljs.com/#custom-formats
interface NumeralJsFormat {
regexps: {
format: RegExp,
unformat: RegExp,
},
format: (value: any, format: string, roundingFunction: Function) => string,
unformat: (value: string) => number
} | Ariadna-Software/asw_sii_aeat | typings/globals/numeral/index.d.ts | TypeScript |
InterfaceDeclaration | // http://numeraljs.com/#use-it
interface Numeral {
(value?: any): Numeral;
version: string;
isNumeral: boolean;
/**
* This function sets the current locale. If no arguments are passed in,
* it will simply return the current global locale key.
*/
locale(key?: string): string;
/**
* Registers a language... | Ariadna-Software/asw_sii_aeat | typings/globals/numeral/index.d.ts | TypeScript |
TypeAliasDeclaration |
type RegisterType = 'format' | 'locale'; | Ariadna-Software/asw_sii_aeat | typings/globals/numeral/index.d.ts | TypeScript |
ArrowFunction |
(sel) => {
const inPosition = new Position(sel.positionLineNumber, sel.positionColumn);
const outPosition = this._move(wordSeparators, model, inPosition, this._wordNavigationType);
return this._moveTo(sel, outPosition, this._inSelectionMode);
} | 0tt0sson/vscode | src/vs/editor/contrib/wordOperations/wordOperations.ts | TypeScript |
ArrowFunction |
r => CursorState.fromModelSelection(r) | 0tt0sson/vscode | src/vs/editor/contrib/wordOperations/wordOperations.ts | TypeScript |
ArrowFunction |
(sel) => {
const deleteRange = this._delete(wordSeparators, model, sel, this._whitespaceHeuristics, this._wordNavigationType);
return new ReplaceCommand(deleteRange, '');
} | 0tt0sson/vscode | src/vs/editor/contrib/wordOperations/wordOperations.ts | TypeScript |
ClassDeclaration |
export abstract class MoveWordCommand extends EditorCommand {
private readonly _inSelectionMode: boolean;
private readonly _wordNavigationType: WordNavigationType;
constructor(opts: MoveWordOptions) {
super(opts);
this._inSelectionMode = opts.inSelectionMode;
this._wordNavigationType = opts.wordNavigationTy... | 0tt0sson/vscode | src/vs/editor/contrib/wordOperations/wordOperations.ts | TypeScript |
ClassDeclaration |
export class WordLeftCommand extends MoveWordCommand {
protected _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position {
return WordOperations.moveWordLeft(wordSeparators, model, position, wordNavigationType);
}
} | 0tt0sson/vscode | src/vs/editor/contrib/wordOperations/wordOperations.ts | TypeScript |
ClassDeclaration |
export class WordRightCommand extends MoveWordCommand {
protected _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position {
return WordOperations.moveWordRight(wordSeparators, model, position, wordNavigationType);
}
} | 0tt0sson/vscode | src/vs/editor/contrib/wordOperations/wordOperations.ts | TypeScript |
ClassDeclaration |
export class CursorWordStartLeft extends WordLeftCommand {
constructor() {
super({
inSelectionMode: false,
wordNavigationType: WordNavigationType.WordStart,
id: 'cursorWordStartLeft',
precondition: undefined,
kbOpts: {
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCod... | 0tt0sson/vscode | src/vs/editor/contrib/wordOperations/wordOperations.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.