type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
InterfaceDeclaration |
export interface Storage {
_id: string;
name: string;
remark: string;
} | Aralhi/RepairMan | client/app/models/storage.ts | TypeScript |
ClassDeclaration |
export class Main {
public useTcpPort: number;
constructor() {
this.useTcpPort = 43859;
this.parseArgs();
}
parseArgs() {
throw new Error('Method not implemented.');
}
start() {
throw new Error('Method not implemented.');
}
} | haneefdm/cortex-debug-proxy | src/main.ts | TypeScript |
MethodDeclaration |
parseArgs() {
throw new Error('Method not implemented.');
} | haneefdm/cortex-debug-proxy | src/main.ts | TypeScript |
MethodDeclaration |
start() {
throw new Error('Method not implemented.');
} | haneefdm/cortex-debug-proxy | src/main.ts | TypeScript |
ArrowFunction |
(props) => {
const { color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke={color}
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
{...othe... | anythingcodes/canvas-framer | src/code/icons/phone.tsx | TypeScript |
ClassDeclaration |
export class BaseRepo extends RootClass {
protected db: Kmore<DbModel>
@Init()
async init(): Promise<void> {
/* c8 ignore next 3 */
if (! this.ctx) {
this.throwError('Value of this.ctx is undefined during Repo init')
}
if (! this.ctx.dbTransactions || this.ctx.dbTransactions.size) {
... | waitingsong/midway-mono-base | packages/demo-service/src/core/base.repo.ts | TypeScript |
MethodDeclaration |
@Init()
async init(): Promise<void> {
/* c8 ignore next 3 */
if (! this.ctx) {
this.throwError('Value of this.ctx is undefined during Repo init')
}
if (! this.ctx.dbTransactions || this.ctx.dbTransactions.size) {
this.ctx.dbTransactions = new Set()
}
const container = this.app.ge... | waitingsong/midway-mono-base | packages/demo-service/src/core/base.repo.ts | TypeScript |
MethodDeclaration | /**
* Start and return a db transacton
* @description using `this.db.dbh` if param dbhInstance undefined
*/
async startTransaction(dbhInstance?: Knex): Promise<DbTransaction> {
const dbh = dbhInstance ?? this.db.dbh
/* c8 ignore next 3 */
if (! dbh) {
this.throwError('dbh undefined', 999)
... | waitingsong/midway-mono-base | packages/demo-service/src/core/base.repo.ts | TypeScript |
FunctionDeclaration |
export function configureDatabase() {
mongoose.connect(
// tslint:disable-next-line:max-line-length
environment.db.mongoUri,
{ dbName: 'test' }).then(() => {
console.log('Connection to the Atlas Cluster is successful!')
})
.catch((err) => {
console.error(err)
console.error('Mak... | jwoodmansey/safarnama | src/express/configureDatabase.ts | TypeScript |
ArrowFunction |
() => {
console.log('Connection to the Atlas Cluster is successful!')
} | jwoodmansey/safarnama | src/express/configureDatabase.ts | TypeScript |
ArrowFunction |
(err) => {
console.error(err)
console.error('Make sure your IP has been whitelisted!')
} | jwoodmansey/safarnama | src/express/configureDatabase.ts | TypeScript |
ArrowFunction |
(text: string | number): string | number => {
return `\u001B[1m${text}\u001B[0m`;
} | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(arg, i) => {
// [0] contains the binary running the script (`node` for example) and
// [1] contains the script name, so the arguments come after that.
process.argv[i + 2] = arg;
} | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(socket: WebSocket): void => {
const active = new SharedProcessActive();
active.setSocketPath(sharedProcess.socketPath);
active.setLogPath(logDir);
const serverMessage = new ServerMessage();
serverMessage.setSharedProcessActive(active);
socket.send(serverMessage.serializeBinary());
} | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(event) => {
if (event.state === SharedProcessState.Ready) {
app.wss.clients.forEach((c) => sendSharedProcessReady(c));
}
} | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(c) => sendSharedProcessReady(c) | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(app): void => {
app.use((req, res, next) => {
res.on("finish", () => {
logger.trace(`\u001B[1m${req.method} ${res.statusCode} \u001B[0m${req.url}`, field("host", req.hostname), field("ip", req.ip));
});
next();
});
// If we're not running from the binary and we aren't serving the static
... | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(req, res, next) => {
res.on("finish", () => {
logger.trace(`\u001B[1m${req.method} ${res.statusCode} \u001B[0m${req.url}`, field("host", req.hostname), field("ip", req.ip));
});
next();
} | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
() => {
logger.trace(`\u001B[1m${req.method} ${res.statusCode} \u001B[0m${req.url}`, field("host", req.hostname), field("ip", req.ip));
} | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess => {
if (options && options.env && options.env.AMD_ENTRYPOINT) {
return forkModule(options.env.AMD_ENTRYPOINT, args, options, dataDir);
}
if (isCli) {
return spawn(process.execPath, [path.join(buildDir, "out", "cli.js"), ... | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(ws, req) => {
const id = clientId++;
if (sharedProcess.state === SharedProcessState.Ready) {
sendSharedProcessReady(ws);
}
logger.info(`WebSocket opened \u001B[0m${req.url}`, field("client", id), field("ip", req.socket.remoteAddress));
ws.on("close", (code) => {
logger.info(`WebSocket closed \u001B... | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(code) => {
logger.info(`WebSocket closed \u001B[0m${req.url}`, field("client", id), field("code", code));
} | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(err: NodeJS.ErrnoException) => {
if (err.code === "EADDRINUSE") {
logger.error(`Port ${bold(options.port)} is in use. Please free up port ${options.port} or specify a different port with the -p flag`);
process.exit(1);
}
} | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
ArrowFunction |
(ex) => {
logger.error(ex);
} | Lulzx/code-server | packages/server/src/cli.ts | TypeScript |
FunctionDeclaration |
export function updateDependencies(tree: Tree, schema: Schema) {
let devDependencies = {
'svelte-jester': '^1.3.2',
svelte: '^3.42.1',
'svelte-check': '^1.4.0',
'svelte-preprocess': '^4.7.4',
'@tsconfig/svelte': '^1.0.10',
'@testing-library/svelte': '^3.0.3',
'rollup-plugin-local-resolve'... | JoMen6/nx-extensions | packages/svelte/src/generators/init/lib/add-dependencies.ts | TypeScript |
ClassDeclaration |
@NgModule({
imports: [
CommonModule,
RouterModule.forChild(routes),
AccordionControlModule.forRoot(),
MaterialPreviewModule,
PartialsModule,
CoreModule,
FormsModule,
ReactiveFormsModule,
MatInputModule,
MatFormFieldModule,
MatDatepickerModule,
MatAutocompleteModule,
MatListModule,
MatSlide... | duberg/annette-sphera | annette-frontend-sphera/ng/src/app/content/pages/components/metronic/metronic.module.ts | TypeScript |
ClassDeclaration |
export class App extends React.Component<Props, State> {
constructor(props: Props) {
super(props);
this.state = {satisfactionLevel: 300};
}
public render() {
return (
<div>
<input type="range"
min="0"
max="500"
value={this.state.satisfac... | Lemoncode/react-by-sample | 13_ShouldUpdate/src/app.tsx | TypeScript |
InterfaceDeclaration |
interface Props {
} | Lemoncode/react-by-sample | 13_ShouldUpdate/src/app.tsx | TypeScript |
InterfaceDeclaration |
interface State {
satisfactionLevel : number;
} | Lemoncode/react-by-sample | 13_ShouldUpdate/src/app.tsx | TypeScript |
MethodDeclaration |
public render() {
return (
<div>
<input type="range"
min="0"
max="500"
value={this.state.satisfactionLevel}
onChange={(event : any) => this.setState({satisfactionLevel :event.target.value} as State)} | Lemoncode/react-by-sample | 13_ShouldUpdate/src/app.tsx | TypeScript |
ArrowFunction |
() => {
this.container.innerHTML = isEmpty ? '' : this.render()
} | nbili/ui-component-oop | src/code/Spin.ts | TypeScript |
ClassDeclaration |
class Spin {
container: HTMLElement
options: Partial<Options>
size: Options['size']
delay: Options['delay']
spinning: Options['spinning']
constructor(el: HTMLElement | string, options?: Partial<Options>) {
this.container = getElement(el)
this.options = Object.assign({ delay: 0, size: 'default', sp... | nbili/ui-component-oop | src/code/Spin.ts | TypeScript |
TypeAliasDeclaration |
export type Options = {
delay: number
size: 'default' | 'large'
spinning: boolean
} | nbili/ui-component-oop | src/code/Spin.ts | TypeScript |
MethodDeclaration |
show() {
this.toRender()
this.spinning = true
} | nbili/ui-component-oop | src/code/Spin.ts | TypeScript |
MethodDeclaration |
hide() {
this.toRender(true)
this.spinning = false
} | nbili/ui-component-oop | src/code/Spin.ts | TypeScript |
MethodDeclaration |
toRender(isEmpty = false) {
if (this.delay) {
setTimeout(() => {
this.container.innerHTML = isEmpty ? '' : this.render()
}, this.delay);
} else {
this.container.innerHTML = isEmpty ? '' : this.render()
}
} | nbili/ui-component-oop | src/code/Spin.ts | TypeScript |
MethodDeclaration |
render() {
let size = this.size
return `
<div class="spin-spinning ${size === 'large' ? 'spin-lg' : 'spin'}">
<span class="spin-dot spin-to-spin">
<i class="spin-dot__item"></i>
<i class="spin-dot__item"></i>
<i class="spin-dot__item"></i>
<i class="spin-do... | nbili/ui-component-oop | src/code/Spin.ts | TypeScript |
FunctionDeclaration | /**
* isRef
* @param obj value
*/
export function isRef<T>(obj: any): obj is Ref<T> {
return obj instanceof RefImpl;
} | aceHubert/ace-vue | packages/acevue-hooks/src/apis/ref.ts | TypeScript |
FunctionDeclaration | /**
* createRef
* @param options get/set
*/
export function createRef<T>(options: RefOption<T>): RefObject<T> {
const vm = ensureCurrentVM('createRef');
const id = getCallId();
const store = (vm._refsStore = vm._refsStore || {});
// seal the ref, this could prevent ref from being observed
// It's... | aceHubert/ace-vue | packages/acevue-hooks/src/apis/ref.ts | TypeScript |
FunctionDeclaration | /**
* overload 1: for potentially undefined initialValue / call with 0 arguments
*/
export function useRef<T extends unknown = undefined>(): MutableRefObject<T | undefined>; | aceHubert/ace-vue | packages/acevue-hooks/src/apis/ref.ts | TypeScript |
FunctionDeclaration | /**
* overload 2: returns a mutable ref object whose `.current` property is initialized to the passed argument "initialValue"
* @param initialValue initial value
*/
export function useRef<T extends unknown>(initialValue: T): MutableRefObject<T>; | aceHubert/ace-vue | packages/acevue-hooks/src/apis/ref.ts | TypeScript |
FunctionDeclaration | /**
* overload 3: for refs given as a ref prop as they typically start with a null value
* @param initialValue initial value
*/
export function useRef<T>(initialValue: T | null): RefObject<T>; | aceHubert/ace-vue | packages/acevue-hooks/src/apis/ref.ts | TypeScript |
FunctionDeclaration | /**
* implementation
*/
export function useRef<T>(initialValue?: T): MutableRefObject<T> | RefObject<T> {
const vm = ensureCurrentVM('useRef');
const id = getCallId();
const store = (vm._refsStore = vm._refsStore || {});
if (isMounting()) {
store[id] = initialValue;
}
return createRef({
... | aceHubert/ace-vue | packages/acevue-hooks/src/apis/ref.ts | TypeScript |
ArrowFunction |
() => store[id] | aceHubert/ace-vue | packages/acevue-hooks/src/apis/ref.ts | TypeScript |
ArrowFunction |
val => (store[id] = val) | aceHubert/ace-vue | packages/acevue-hooks/src/apis/ref.ts | TypeScript |
ClassDeclaration |
class RefImpl<T> implements RefObject<T> {
public current!: T;
constructor({ get, set }: RefOption<T>) {
proxy(this, 'current', {
get,
set,
});
}
} | aceHubert/ace-vue | packages/acevue-hooks/src/apis/ref.ts | TypeScript |
ArrowFunction |
current => current === name | ArtMajMarviq/Intershop | src/app/extensions/tacton/pages/configure/tacton-configure-navigation/tacton-configure-navigation.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'ish-tacton-configure-navigation',
templateUrl: './tacton-configure-navigation.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TactonConfigureNavigationComponent implements OnInit {
tree$: Observable<TactonNavigationTree>;
constructor(private tactonFa... | ArtMajMarviq/Intershop | src/app/extensions/tacton/pages/configure/tacton-configure-navigation/tacton-configure-navigation.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.tree$ = this.tactonFacade.configurationTree$;
} | ArtMajMarviq/Intershop | src/app/extensions/tacton/pages/configure/tacton-configure-navigation/tacton-configure-navigation.component.ts | TypeScript |
MethodDeclaration |
changeStep(step: string) {
this.tactonFacade.changeConfigurationStep(step);
} | ArtMajMarviq/Intershop | src/app/extensions/tacton/pages/configure/tacton-configure-navigation/tacton-configure-navigation.component.ts | TypeScript |
MethodDeclaration | /**
* scroll anchor smoothly into view
* @see https://stackoverflow.com/questions/46658522/how-to-smooth-scroll-to-page-anchor-in-angular-4-without-plugins-properly/51400379#51400379
*/
scrollIntoView(id: string) {
document.querySelector(`#anchor-${id}`)?.scrollIntoView({ behavior: 'smooth', block: 'start'... | ArtMajMarviq/Intershop | src/app/extensions/tacton/pages/configure/tacton-configure-navigation/tacton-configure-navigation.component.ts | TypeScript |
MethodDeclaration |
isActive$(name: string) {
return this.tactonFacade.currentGroup$.pipe(map(current => current === name));
} | ArtMajMarviq/Intershop | src/app/extensions/tacton/pages/configure/tacton-configure-navigation/tacton-configure-navigation.component.ts | TypeScript |
ArrowFunction |
() => RoleAndPermession | foaudkajj/telegram-siparis-botu | src/DB/models/Role.ts | TypeScript |
ArrowFunction |
roleAndPermession => roleAndPermession.Role | foaudkajj/telegram-siparis-botu | src/DB/models/Role.ts | TypeScript |
ArrowFunction |
() => User | foaudkajj/telegram-siparis-botu | src/DB/models/Role.ts | TypeScript |
ArrowFunction |
pnaleUser => pnaleUser.Role | foaudkajj/telegram-siparis-botu | src/DB/models/Role.ts | TypeScript |
ClassDeclaration |
@Entity()
export class Role {
@PrimaryGeneratedColumn()
Id: number;
@Column()
RoleName: string;
@Column({ nullable: true })
Description: string;
@OneToMany(() => RoleAndPermession, roleAndPermession => roleAndPermession.Role)
RoleAndPermessions: RoleAndPermession[];
@OneToMany(() =>... | foaudkajj/telegram-siparis-botu | src/DB/models/Role.ts | TypeScript |
ArrowFunction |
(recordedActions: Action[]): Middleware =>
() => (next) => (action) => {
recordedActions.push(action);
return next(action);
} | 0xblack/try | Microsoft.DotNet.Try.Client/test/ActionRecorderMiddleware.ts | TypeScript |
ArrowFunction |
() => (next) => (action) => {
recordedActions.push(action);
return next(action);
} | 0xblack/try | Microsoft.DotNet.Try.Client/test/ActionRecorderMiddleware.ts | TypeScript |
ArrowFunction |
(next) => (action) => {
recordedActions.push(action);
return next(action);
} | 0xblack/try | Microsoft.DotNet.Try.Client/test/ActionRecorderMiddleware.ts | TypeScript |
ArrowFunction |
(action) => {
recordedActions.push(action);
return next(action);
} | 0xblack/try | Microsoft.DotNet.Try.Client/test/ActionRecorderMiddleware.ts | TypeScript |
ClassDeclaration |
export default class PhoneInput extends React.Component<PhoneInputProps> {} | ThreadsStyling/react-native-phone-input | lib/index.d.ts | TypeScript |
InterfaceDeclaration |
export interface PhoneInputProps {
initialCountry?: string;
allowZeroAfterCountryCode?: boolean;
disabled?: boolean;
value?: string | null;
style?: any;
flagStyle?: object;
textStyle?: object;
textProps?: TextInputProps;
textComponent?: React.ComponentType;
offset?: number;
pickerButtonColor?: st... | ThreadsStyling/react-native-phone-input | lib/index.d.ts | TypeScript |
ArrowFunction |
(logger: Logger): IMiddleware => {
return async (ctx: Context, next: () => Promise<unknown>) => {
const start = Date.now();
await next();
const message = `[${ctx.status}] ${ctx.method} ${ctx.path}`;
const logData: LogData = {
method: ctx.method,
path: ctx.path,
statusCode: ctx.sta... | alphabitdev/Node-TypeScript-Koa-TypeOrm-API-Boilerplate | src/server/middleware/log-request.ts | TypeScript |
ArrowFunction |
async (ctx: Context, next: () => Promise<unknown>) => {
const start = Date.now();
await next();
const message = `[${ctx.status}] ${ctx.method} ${ctx.path}`;
const logData: LogData = {
method: ctx.method,
path: ctx.path,
statusCode: ctx.status,
timeMs: Date.now() - start
};... | alphabitdev/Node-TypeScript-Koa-TypeOrm-API-Boilerplate | src/server/middleware/log-request.ts | TypeScript |
InterfaceDeclaration |
interface LogData {
method: string;
path: string;
statusCode: number;
timeMs: number;
} | alphabitdev/Node-TypeScript-Koa-TypeOrm-API-Boilerplate | src/server/middleware/log-request.ts | TypeScript |
ArrowFunction |
(option) => html` <paper-item>${option}</paper-item> ` | cornim/frontend | src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts | TypeScript |
ClassDeclaration |
@customElement("hui-input-select-entity-row")
class HuiInputSelectEntityRow extends LitElement implements LovelaceRow {
@property({ attribute: false }) public hass?: HomeAssistant;
@internalProperty() private _config?: EntitiesCardEntityConfig;
public setConfig(config: EntitiesCardEntityConfig): void {
if ... | cornim/frontend | src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts | TypeScript |
InterfaceDeclaration |
interface HTMLElementTagNameMap {
"hui-input-select-entity-row": HuiInputSelectEntityRow;
} | cornim/frontend | src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts | TypeScript |
MethodDeclaration |
public setConfig(config: EntitiesCardEntityConfig): void {
if (!config || !config.entity) {
throw new Error("Entity must be specified");
}
this._config = config;
} | cornim/frontend | src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts | TypeScript |
MethodDeclaration |
protected shouldUpdate(changedProps: PropertyValues): boolean {
return hasConfigOrEntityChanged(this, changedProps);
} | cornim/frontend | src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts | TypeScript |
MethodDeclaration |
protected render(): TemplateResult {
if (!this.hass || !this._config) {
return html``;
}
const stateObj = this.hass.states[this._config.entity] as
| InputSelectEntity
| undefined;
if (!stateObj) {
return html`
<hui-warning>
${createEntityNotFoundWarning(this.... | cornim/frontend | src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts | TypeScript |
MethodDeclaration |
protected updated(changedProps: PropertyValues) {
super.updated(changedProps);
if (!this.hass || !this._config) {
return;
}
const stateObj = this.hass.states[this._config.entity] as
| InputSelectEntity
| undefined;
if (!stateObj) {
return;
}
// Update selected af... | cornim/frontend | src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts | TypeScript |
MethodDeclaration |
private _handleAction(ev: ActionHandlerEvent) {
handleAction(this, this.hass!, this._config!, ev.detail.action!);
} | cornim/frontend | src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts | TypeScript |
MethodDeclaration |
private _selectedChanged(ev): void {
const stateObj = this.hass!.states[this._config!.entity];
const option = ev.target.selectedItem.innerText.trim();
if (option === stateObj.state) {
return;
}
forwardHaptic("light");
setInputSelectOption(this.hass!, stateObj.entity_id, option);
} | cornim/frontend | src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts | TypeScript |
FunctionDeclaration | // Utils for computing event store from the DragMeta
// ----------------------------------------------------------------------------------------------------
function computeEventForDateSpan(dateSpan: DateSpan, dragMeta: DragMeta, calendar: Calendar): EventTuple {
let defProps = { ...dragMeta.leftoverProps }
for (l... | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
FunctionDeclaration | // Utils for extracting data from element
// ----------------------------------------------------------------------------------------------------
function getDragMetaFromEl(el: HTMLElement): DragMeta {
let str = getEmbeddedElData(el, 'event')
let obj = str ?
JSON.parse(str) :
{ create: false } // if no embe... | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
FunctionDeclaration |
function getEmbeddedElData(el: HTMLElement, name: string): string {
let prefix = config.dataAttrPrefix
let prefixedName = (prefix ? prefix + '-' : '') + name
return el.getAttribute('data-' + prefixedName) || ''
} | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
ArrowFunction |
(ev: PointerDragEvent) => {
this.dragMeta = this.buildDragMeta(ev.subjectEl as HTMLElement)
} | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
ArrowFunction |
(hit: Hit | null, isFinal: boolean, ev: PointerDragEvent) => {
let { dragging } = this.hitDragging
let receivingCalendar: Calendar | null = null
let droppableEvent: EventTuple | null = null
let isInvalid = false
let interaction: EventInteractionState = {
affectedEvents: createEmptyEventStore(... | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
ArrowFunction |
(pev: PointerDragEvent) => {
let { receivingCalendar, droppableEvent } = this
this.clearDrag()
if (receivingCalendar && droppableEvent) {
let finalHit = this.hitDragging.finalHit!
let finalView = finalHit.component.view
let dragMeta = this.dragMeta!
let arg = receivingCalendar.bui... | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
ClassDeclaration | /*
Given an already instantiated draggable object for one-or-more elements,
Interprets any dragging as an attempt to drag an events that lives outside
of a calendar onto a calendar.
*/
export default class ExternalElementDragging {
hitDragging: HitDragging
receivingCalendar: Calendar | null = null
droppableEvent... | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
InterfaceDeclaration |
export interface ExternalDropApi extends DatePointApi {
draggedEl: HTMLElement
jsEvent: UIEvent
view: View
} | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
TypeAliasDeclaration |
export type DragMetaGenerator = DragMetaInput | ((el: HTMLElement) => DragMetaInput) | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
MethodDeclaration |
buildDragMeta(subjectEl: HTMLElement) {
if (typeof this.suppliedDragMeta === 'object') {
return parseDragMeta(this.suppliedDragMeta)
} else if (typeof this.suppliedDragMeta === 'function') {
return parseDragMeta(this.suppliedDragMeta(subjectEl))
} else {
return getDragMetaFromEl(subjectEl... | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
MethodDeclaration |
displayDrag(nextCalendar: Calendar | null, state: EventInteractionState) {
let prevCalendar = this.receivingCalendar
if (prevCalendar && prevCalendar !== nextCalendar) {
prevCalendar.dispatch({ type: 'UNSET_EVENT_DRAG' })
}
if (nextCalendar) {
nextCalendar.dispatch({ type: 'SET_EVENT_DRAG... | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
MethodDeclaration |
clearDrag() {
if (this.receivingCalendar) {
this.receivingCalendar.dispatch({ type: 'UNSET_EVENT_DRAG' })
}
} | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
MethodDeclaration |
canDropElOnCalendar(el: HTMLElement, receivingCalendar: Calendar): boolean {
let dropAccept = receivingCalendar.opt('dropAccept')
if (typeof dropAccept === 'function') {
return dropAccept(el)
} else if (typeof dropAccept === 'string' && dropAccept) {
return Boolean(elementMatches(el, dropAccep... | mer30hamid/fullcalendar | src/interaction/interactions-external/ExternalElementDragging.ts | TypeScript |
FunctionDeclaration |
export function extractAuthor (digest: Digest, sessionValidators: AccountId[] = []): AccountId | undefined {
const [pitem] = digest.logs.filter(({ type }) => type === 'PreRuntime');
// extract from the substrate 2.0 PreRuntime digest
if (pitem) {
const [engine, data] = pitem.asPreRuntime;
return engine... | icodezjb/api | packages/api-derive/src/type/util.ts | TypeScript |
ArrowFunction |
({ type }) => type === 'PreRuntime' | icodezjb/api | packages/api-derive/src/type/util.ts | TypeScript |
ArrowFunction |
({ type }) => type === 'Consensus' | icodezjb/api | packages/api-derive/src/type/util.ts | TypeScript |
ArrowFunction |
() => [Order] | AhmadSinaSaeedi/nestjs-online-shop | src/orders/orders.resolver.ts | TypeScript |
ArrowFunction |
(i) => mapOrderEntityToDto(i) | AhmadSinaSaeedi/nestjs-online-shop | src/orders/orders.resolver.ts | TypeScript |
ArrowFunction |
() => Order | AhmadSinaSaeedi/nestjs-online-shop | src/orders/orders.resolver.ts | TypeScript |
ClassDeclaration |
@Resolver('Orders')
export class OrdersResolver {
constructor(private OrdersService: OrdersService) {}
@Query(() => [Order])
async orders(): Promise<Order[]> {
const orders = await this.OrdersService.findAll();
return orders.map((i) => mapOrderEntityToDto(i));
}
@Query(() => Order)
async order(@A... | AhmadSinaSaeedi/nestjs-online-shop | src/orders/orders.resolver.ts | TypeScript |
MethodDeclaration |
@Query(() => [Order])
async orders(): Promise<Order[]> {
const orders = await this.OrdersService.findAll();
return orders.map((i) => mapOrderEntityToDto(i));
} | AhmadSinaSaeedi/nestjs-online-shop | src/orders/orders.resolver.ts | TypeScript |
MethodDeclaration |
@Query(() => Order)
async order(@Args('id') id: string) {
const order = await this.OrdersService.findById(id);
return mapOrderEntityToDto(order);
} | AhmadSinaSaeedi/nestjs-online-shop | src/orders/orders.resolver.ts | TypeScript |
MethodDeclaration |
@Mutation(() => Order)
async orderCreate(@Args('data') data: OrderInput) {
console.log('data', data.items);
return null;
} | AhmadSinaSaeedi/nestjs-online-shop | src/orders/orders.resolver.ts | TypeScript |
ClassDeclaration |
declare class NodeHandler {
handler: Handler;
constructor(handler: Handler);
/**
* Get the node path by target object
* @param {NodeObject} target
* @param {NodeObject[]} [nodes=[]]
* @param {string} [direction='init']
*/
getNodePath: (target: NodeObject, nodes?: NodeObject[], ... | LeHaine/react-design-editor | lib/handlers/NodeHandler.d.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-ideogram',
templateUrl: './ideogram.component.html',
styleUrls: ['./ideogram.component.css']
})
export class IdeogramComponent implements OnInit {
constructor() { }
ngOnInit() {
this.createIdeogram();
}
createIdeogram() {
const ideogram = new Ideogram({
organi... | Zhu-Ying/ideogram | examples/angular/src/app/ideogram/ideogram.component.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.