filename
stringlengths
20
188
language
stringclasses
3 values
AST-segments
stringlengths
0
204k
Peersyst_blockscout-frontend_configs_app_meta.ts
typescript
import app from './app'; import { getEnvValue
Peersyst_blockscout-frontend_configs_app_meta.ts
typescript
getExternalAssetFilePath } from './utils'; const defaultImageUrl = app.baseUrl + '/static/og_placeholder.png';
Peersyst_blockscout-frontend_configs_app_meta.ts
typescript
const meta = Object.freeze({ promoteBlockscoutInTitle: getEnvValue('NEXT_PUBLIC_PROMOTE_BLOCKSCOUT_IN_TITLE') || 'true'
Peersyst_blockscout-frontend_configs_app_meta.ts
typescript
og: { description: getEnvValue('NEXT_PUBLIC_OG_DESCRIPTION') || ''
Peersyst_blockscout-frontend_configs_app_meta.ts
typescript
imageUrl: getExternalAssetFilePath('NEXT_PUBLIC_OG_IMAGE_URL') || defaultImageUrl
Peersyst_blockscout-frontend_configs_app_meta.ts
typescript
}
Peersyst_blockscout-frontend_configs_app_meta.ts
typescript
});
Peersyst_blockscout-frontend_configs_app_meta.ts
typescript
export default meta;
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
import { context } from "near-sdk-as"; import * as contractController from "./controller/contract.controller"; import { SaleContract } from "./models/SaleContract.model";
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
import { ContractInfomation } from "./models/ContractInfomation.model"; // create new SaleContract
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
export function createContract( contractInfomation: ContractInfomation
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
createdAt: u64 ): u64 { return contractController.createContract(contractInfomation
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
createdAt); }
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
// get All Contracts of a user export function getMyContracts(user: string): Array<SaleContract> { return contractController.getMyContracts(user); } // get All Contracts are Saling
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
export function getExchanges(): Array<SaleContract> { return contractController.getExchanges(); } // get All Contracts -> test
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
export function getAll(): Array<SaleContract> { return contractController.getAll(); } // buy a Account
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
export function buyAccount(id: string
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
closedAt: u64): u64 { return contractController.buyAccount(id
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
closedAt); } // delete All Contract -> test
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
export function deleteContracts(): u64 { return contractController.deleteContracts(); } // delete a Contract -> test
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
export function deleteContract(id: string): u64 { return contractController.deleteContract(context.sender
Learn-NEAR-Club_eco-near_assembly_index.ts
typescript
id); }
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
import { Immediate } from '../util/Immediate'; import { AsyncAction } from './AsyncAction'; import { AsapScheduler } from './AsapScheduler'; import { SchedulerAction } from '../types';
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
/** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
export class AsapAction<T> extends AsyncAction<T> { constructor(protected scheduler: AsapScheduler
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
protected work: (this: SchedulerAction<T>
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
state?: T) => void) { super(scheduler
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
work); } protected requestAsyncId(scheduler: AsapScheduler
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
id?: any
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
delay: number = 0): any { // If delay is greater than 0
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
request as an async action. if (delay !== null && delay > 0) { return super.requestAsyncId(scheduler
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
id
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
delay); } // Push the action to the end of the scheduler queue. scheduler.actions.push(this); // If a microtask has already been scheduled
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
don't schedule another // one. If a microtask hasn't been scheduled yet
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
schedule one now. Return // the current scheduled microtask id. return scheduler.scheduled || (scheduler.scheduled = Immediate.setImmediate( scheduler.flush.bind(scheduler
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
null) )); } protected recycleAsyncId(scheduler: AsapScheduler
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
id?: any
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
delay: number = 0): any { // If delay exists and is greater than 0
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
or if the delay is null (the // action wasn't rescheduled) but was originally scheduled as an async // action
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
then recycle as an async action. if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { return super.recycleAsyncId(scheduler
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
id
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
delay); } // If the scheduler queue is empty
JIC1816_Car-Near-Me_node_modules_rxjs_src_internal_scheduler_AsapAction.ts
typescript
cancel the requested microtask and // set the scheduled flag to undefined so the next AsapAction will schedule // its own. if (scheduler.actions.length === 0) { Immediate.clearImmediate(id); scheduler.scheduled = undefined; } // Return undefined so the action knows to request a new async id if it's rescheduled. return undefined; } }
LexiccLabs_near-memegen_assembly_model.ts
typescript
// Exporting a new class PostedMessage so it can be used outside of this file.
LexiccLabs_near-memegen_assembly_model.ts
typescript
export class Meme { id: i32; sender: string; timeMs: i32; imgUrl: string; topText: string; middleText: string; bottomText: string; }