type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ClassDeclaration |
export class TelegramError extends Error {
constructor(readonly response: ErrorPayload, readonly on = {}) {
super(`${response.error_code}: ${response.description}`)
}
get code() {
return this.response.error_code
}
get description() {
return this.response.description
}
get parameters() {
... | AlbertEinsteinTG/telegraf | src/core/network/error.ts | TypeScript |
InterfaceDeclaration |
interface ErrorPayload {
error_code: number
description: string
parameters?: ResponseParameters
} | AlbertEinsteinTG/telegraf | src/core/network/error.ts | TypeScript |
ArrowFunction |
col => col.getId() | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
ArrowFunction |
(child: OriginalColumnGroupChild)=> {
if (child instanceof OriginalColumnGroup) {
(<OriginalColumnGroup>child).setupExpandable();
}
} | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
ArrowFunction |
col => {
let fakeTreeItem = this.createAutoGroupTreeItem(gridBalancedTree, col);
autoColBalancedTree.push(fakeTreeItem);
} | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
ArrowFunction |
(child: OriginalColumnGroupChild)=> {
if (child instanceof OriginalColumnGroup) {
let originalGroup = <OriginalColumnGroup> child;
let newChildren = this.balanceColumnTree(originalGroup.getChildren(),
currentDept + 1, columnDept, columnKeyCreator);
... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
ArrowFunction |
(def: ColDef|ColGroupDef)=> {
let newGroupOrColumn: OriginalColumnGroupChild;
if (this.isColumnGroup(def)) {
newGroupOrColumn = this.createColumnGroup(primaryColumns, <ColGroupDef> def, level, existingColsCopy, columnKeyCreator);
} else {
newGroupOrCo... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
ArrowFunction |
col => {
let oldColDef = col.getUserProvidedColDef();
if (!oldColDef) { return false; }
// first check object references
if (oldColDef===colDef) {
return true;
}
// second check id's
let oldColHadId = oldColDef.colId !... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
ArrowFunction |
a => typeof a !== 'string' | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
ArrowFunction |
(t) => {
let typeColDef = allColumnTypes[t.trim()];
if (typeColDef) {
_.assign(colDefMerged, typeColDef);
} else {
console.warn("ag-grid: colDef.type '" + t + "' does not correspond to defined gridOptions.columnTypes");
}
} | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private setBeans(@Qualifier('loggerFactory') loggerFactory: LoggerFactory) {
this.logger = loggerFactory.create('ColumnFactory');
} | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
public createColumnTree(defs: (ColDef|ColGroupDef)[], primaryColumns: boolean, existingColumns?: Column[])
: {columnTree: OriginalColumnGroupChild[], treeDept: number} {
// column key creator dishes out unique column id's in a deterministic way,
// so if we have two grids (that could be master... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
public createForAutoGroups(autoGroupCols: Column[], gridBalancedTree: OriginalColumnGroupChild[]): OriginalColumnGroupChild[] {
let autoColBalancedTree: OriginalColumnGroupChild[] = [];
autoGroupCols.forEach( col => {
let fakeTreeItem = this.createAutoGroupTreeItem(gridBalancedTree, col);
... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private createAutoGroupTreeItem(balancedColumnTree: OriginalColumnGroupChild[], column: Column): OriginalColumnGroupChild {
let dept = this.findDept(balancedColumnTree);
// at the end, this will be the top of the tree item.
let nextChild: OriginalColumnGroupChild = column;
for (let i... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private findDept(balancedColumnTree: OriginalColumnGroupChild[]): number {
let dept = 0;
let pointer = balancedColumnTree;
while (pointer && pointer[0] && pointer[0] instanceof OriginalColumnGroup) {
dept++;
pointer = (<OriginalColumnGroup>pointer[0]).getChildren();
... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private balanceColumnTree(unbalancedTree: OriginalColumnGroupChild[], currentDept: number,
columnDept: number, columnKeyCreator: ColumnKeyCreator): OriginalColumnGroupChild[] {
let result: OriginalColumnGroupChild[] = [];
// go through each child, for groups, recurse a l... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private findMaxDept(treeChildren: OriginalColumnGroupChild[], dept: number): number {
let maxDeptThisLevel = dept;
for (let i = 0; i<treeChildren.length; i++) {
let abstractColumn = treeChildren[i];
if (abstractColumn instanceof OriginalColumnGroup) {
let origina... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private recursivelyCreateColumns(defs: (ColDef|ColGroupDef)[], level: number,
primaryColumns: boolean, existingColsCopy: Column[],
columnKeyCreator: ColumnKeyCreator): OriginalColumnGroupChild[] {
let result: OriginalColumnGroupChild[] ... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private createColumnGroup(primaryColumns: boolean, colGroupDef: ColGroupDef, level: number,
existingColumns: Column[], columnKeyCreator: ColumnKeyCreator): OriginalColumnGroup {
let colGroupDefMerged = this.createMergedColGroupDef(colGroupDef);
let groupId = columnKeyCrea... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private createMergedColGroupDef(colGroupDef: ColGroupDef): ColGroupDef {
let colGroupDefMerged: ColGroupDef = <ColGroupDef> {};
_.assign(colGroupDefMerged, this.gridOptionsWrapper.getDefaultColGroupDef());
_.assign(colGroupDefMerged, colGroupDef);
this.checkForDeprecatedItems(colGroupDe... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private createColumn(primaryColumns: boolean, colDef: ColDef,
existingColsCopy: Column[], columnKeyCreator: ColumnKeyCreator): Column {
let colDefMerged = this.mergeColDefs(colDef);
this.checkForDeprecatedItems(colDefMerged);
// see if column already exists
let... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private findExistingColumn(colDef: ColDef, existingColsCopy: Column[]): Column {
let res: Column = _.find(existingColsCopy, col => {
let oldColDef = col.getUserProvidedColDef();
if (!oldColDef) { return false; }
// first check object references
if (oldColDef===... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
public mergeColDefs(colDef: ColDef) {
// start with empty merged definition
let colDefMerged: ColDef = <ColDef> {};
// merge properties from default column definitions
_.assign(colDefMerged, this.gridOptionsWrapper.getDefaultColDef());
// merge properties from column type prop... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private assignColumnTypes(colDef: ColDef, colDefMerged: ColDef) {
let typeKeys: string[];
if (colDef.type instanceof Array) {
let invalidArray = colDef.type.some(a => typeof a !== 'string');
if (invalidArray) {
console.warn("ag-grid: if colDef.type is supplied a... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration |
private checkForDeprecatedItems(colDef: AbstractColDef) {
if (colDef) {
let colDefNoType = <any> colDef; // take out the type, so we can access attributes not defined in the type
if (colDefNoType.group !== undefined) {
console.warn('ag-grid: colDef.group is invalid, plea... | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
MethodDeclaration | // if object has children, we assume it's a group
private isColumnGroup(abstractColDef: ColDef|ColGroupDef): boolean {
return (<ColGroupDef>abstractColDef).children !== undefined;
} | Hyeong-jin/ag-grid | packages/ag-grid-community/src/ts/columnController/columnFactory.ts | TypeScript |
ArrowFunction |
() => {
self.registerKeyboardInputs();
} | faridv/hop | src/modules/games/games.module.ts | TypeScript |
ArrowFunction |
() => {
if (typeof callback === 'function')
callback(games);
} | faridv/hop | src/modules/games/games.module.ts | TypeScript |
ArrowFunction |
() => {
self.setActive('prev');
} | faridv/hop | src/modules/games/games.module.ts | TypeScript |
ArrowFunction |
() => {
self.setActive('next');
} | faridv/hop | src/modules/games/games.module.ts | TypeScript |
ArrowFunction |
() => {
self.loadGame();
} | faridv/hop | src/modules/games/games.module.ts | TypeScript |
ClassDeclaration |
export default class GamesModule extends Module {
protected events = {
'games.prev': {control: 'up', title: 'بازی قبلی', icon: 'up'},
'games.next': {control: 'down', title: 'بازی بعدی', icon: 'bottom'},
'games.enter': {control: 'enter', title: 'انتخاب', icon: 'enter'},
};
construc... | faridv/hop | src/modules/games/games.module.ts | TypeScript |
MethodDeclaration |
reInit() {
this.layoutInstance.prepareUnloadModule(this);
this.registerKeyboardInputs();
this.render(GamesConfig);
} | faridv/hop | src/modules/games/games.module.ts | TypeScript |
MethodDeclaration |
render(games, callback?) {
this.templateHelper.render(template, {items: games}, this.$el, 'html', () => {
if (typeof callback === 'function')
callback(games);
});
} | faridv/hop | src/modules/games/games.module.ts | TypeScript |
MethodDeclaration |
setActive(which: string): void {
const $current = $('.game-items').find('li.active').length ? $('.game-items li.active') : $('.game-items li:first');
let $el;
this.templateHelper.removeClass('active', $current);
if (which === 'next') {
if ($current.next().length) {
... | faridv/hop | src/modules/games/games.module.ts | TypeScript |
MethodDeclaration |
loadGame() {
const $current = $('.game-items li.active');
if ($current.length < 1) {
return false;
}
const game = $current.attr('data-game').toString();
let gameObject: any = null;
switch (game) {
case '2048':
gameObject = Game2048... | faridv/hop | src/modules/games/games.module.ts | TypeScript |
MethodDeclaration |
registerKeyboardInputs() {
const self = this;
this.input.addEvent('up', false, this.events['games.prev'], () => {
self.setActive('prev');
});
this.input.addEvent('down', false, this.events['games.next'], () => {
self.setActive('next');
});
this.in... | faridv/hop | src/modules/games/games.module.ts | TypeScript |
ArrowFunction |
() => {
const mockedSignupUser = jest.spyOn(api, "signupApi")
signupUser({ userEmail: "mockUserEmail", password: "mockpassword" })(
jest.fn(),
)
expect(mockedSignupUser).toHaveBeenCalledWith({
userEmail: "mockUserEmail",
password: "mockpassword",
})
} | ishantsolanki/products-listing | src/redux/actions/userActions.test.ts | TypeScript |
ArrowFunction |
() => {
const mockedCheckUser = jest.spyOn(api, "checkUserCredentialsApi")
checkUser({ userEmail: "mockUserEmail", password: "mockpassword" })(jest.fn())
expect(mockedCheckUser).toHaveBeenCalledWith({
userEmail: "mockUserEmail",
password: "mockpassword",
})
} | ishantsolanki/products-listing | src/redux/actions/userActions.test.ts | TypeScript |
FunctionDeclaration |
function initialize () {
window.i18nTemplate.process(window.document, window.loadTimeData)
if (window.loadTimeData && window.loadTimeData.data_) {
initLocale(window.loadTimeData.data_)
}
const dialogArgsRaw = chrome.getVariableValue('dialogArguments')
let dialogArgs
try {
dialogArg... | RSerhii/defiant-core | components/brave_rewards/resources/tip/brave_tip.tsx | TypeScript |
FunctionDeclaration |
function getActions () {
if (actions) {
return actions
}
actions = bindActionCreators(rewardsActions, store.dispatch.bind(store))
return actions
} | RSerhii/defiant-core | components/brave_rewards/resources/tip/brave_tip.tsx | TypeScript |
FunctionDeclaration |
function publisherBanner (data: RewardsTip.Publisher) {
getActions().onPublisherBanner(data)
} | RSerhii/defiant-core | components/brave_rewards/resources/tip/brave_tip.tsx | TypeScript |
FunctionDeclaration |
function walletProperties (properties: {status: number, wallet: RewardsTip.WalletProperties}) {
getActions().onWalletProperties(properties)
} | RSerhii/defiant-core | components/brave_rewards/resources/tip/brave_tip.tsx | TypeScript |
FunctionDeclaration |
function recurringTips (list: string[]) {
getActions().onRecurringTips(list)
} | RSerhii/defiant-core | components/brave_rewards/resources/tip/brave_tip.tsx | TypeScript |
FunctionDeclaration |
function reconcileStamp (stamp: number) {
getActions().onReconcileStamp(stamp)
} | RSerhii/defiant-core | components/brave_rewards/resources/tip/brave_tip.tsx | TypeScript |
FunctionDeclaration |
function recurringTipRemoved (success: boolean) {
getActions().onRecurringTipRemoved(success)
} | RSerhii/defiant-core | components/brave_rewards/resources/tip/brave_tip.tsx | TypeScript |
FunctionDeclaration |
function recurringTipSaved (success: boolean) {
getActions().onRecurringTipSaved(success)
} | RSerhii/defiant-core | components/brave_rewards/resources/tip/brave_tip.tsx | TypeScript |
FunctionDeclaration |
function balance (properties: {status: number, balance: RewardsTip.Balance}) {
getActions().onBalance(properties.status, properties.balance)
} | RSerhii/defiant-core | components/brave_rewards/resources/tip/brave_tip.tsx | TypeScript |
FunctionDeclaration |
function externalWallet (wallet: RewardsTip.ExternalWallet) {
getActions().onExternalWallet(wallet)
} | RSerhii/defiant-core | components/brave_rewards/resources/tip/brave_tip.tsx | TypeScript |
ArrowFunction |
(a, b) => a.lastTransitionTime.localeCompare(b.lastTransitionTime) | 2733284198/kubeapps | dashboard/src/components/BindingList/BindingListEntry.tsx | TypeScript |
ArrowFunction |
() => {
this.setState({
modalIsOpen: true,
});
} | 2733284198/kubeapps | dashboard/src/components/BindingList/BindingListEntry.tsx | TypeScript |
ArrowFunction |
async () => {
this.setState({
modalIsOpen: false,
});
} | 2733284198/kubeapps | dashboard/src/components/BindingList/BindingListEntry.tsx | TypeScript |
ClassDeclaration |
class BindingListEntry extends React.Component<IBindingListEntryProps, IBindingListEntryState> {
public state = {
modalIsOpen: false,
};
public render() {
const {
bindingWithSecret,
bindingWithSecret: { binding },
} = this.props;
const { name } = binding.metadata;
let reason = <... | 2733284198/kubeapps | dashboard/src/components/BindingList/BindingListEntry.tsx | TypeScript |
InterfaceDeclaration |
interface IBindingListEntryProps {
bindingWithSecret: IServiceBindingWithSecret;
removeBinding: (name: string, namespace: string) => Promise<boolean>;
} | 2733284198/kubeapps | dashboard/src/components/BindingList/BindingListEntry.tsx | TypeScript |
InterfaceDeclaration |
interface IBindingListEntryState {
modalIsOpen: boolean;
} | 2733284198/kubeapps | dashboard/src/components/BindingList/BindingListEntry.tsx | TypeScript |
MethodDeclaration |
public render() {
const {
bindingWithSecret,
bindingWithSecret: { binding },
} = this.props;
const { name } = binding.metadata;
let reason = <span />;
let message = "";
const condition = [...binding.status.conditions]
.sort((a, b) => a.lastTransitionTime.localeCompare(b.lastT... | 2733284198/kubeapps | dashboard/src/components/BindingList/BindingListEntry.tsx | TypeScript |
ArrowFunction |
(theme: Theme) =>
createStyles({
root: {
position: 'absolute',
top: '1rem',
right: '1rem',
left: '1rem',
bottom: '1rem',
},
}) | Language-Mapping/language-map | src/components/about/FeedbackForm.tsx | TypeScript |
ArrowFunction |
(props) => {
const classes = useStyles()
return (
<div className={classes.root}>
<iframe
src={DOCS_FORM_SRC}
width="100%"
height="100%"
frameBorder="0"
marginHeight={0}
marginWidth={0}
title="Feedback and questions"
>
Loading…
<... | Language-Mapping/language-map | src/components/about/FeedbackForm.tsx | TypeScript |
FunctionDeclaration |
function innerPatch<T extends StateTree>(
target: T,
patchToApply: DeepPartial<T>
): T {
// TODO: get all keys like symbols as well
for (const key in patchToApply) {
const subPatch = patchToApply[key]
const targetValue = target[key]
if (isPlainObject(targetValue) && isPlainObject(subPatch)) {
... | JerryYuanJ/pinia | src/store.ts | TypeScript |
FunctionDeclaration | /**
* Create an object of computed properties referring to
*
* @param rootStateRef - pinia.state
* @param id - unique name
*/
function computedFromState<T, Id extends string>(
rootStateRef: Ref<Record<Id, T>>,
id: Id
) {
// let asComputed = computed<T>()
const reactiveObject = {} as {
[k in keyof T]: R... | JerryYuanJ/pinia | src/store.ts | TypeScript |
FunctionDeclaration | /**
* Creates a store with its state object. This is meant to be augmented with getters and actions
*
* @param id - unique identifier of the store, like a name. eg: main, cart, user
* @param buildState - function to build the initial state
* @param initialState - initial state applied to the store, Must be correct... | JerryYuanJ/pinia | src/store.ts | TypeScript |
FunctionDeclaration |
function $patch(stateMutation: (state: S) => void): void | JerryYuanJ/pinia | src/store.ts | TypeScript |
FunctionDeclaration |
function $patch(partialState: DeepPartial<S>): void | JerryYuanJ/pinia | src/store.ts | TypeScript |
FunctionDeclaration |
function $patch(
partialStateOrMutator: DeepPartial<S> | ((state: S) => void)
): void {
let partialState: DeepPartial<S> = {}
let type: string
isListening = false
if (typeof partialStateOrMutator === 'function') {
partialStateOrMutator(pinia.state.value[$id])
type = '🧩 patch'
} e... | JerryYuanJ/pinia | src/store.ts | TypeScript |
FunctionDeclaration |
function $subscribe(callback: SubscriptionCallback<S>) {
subscriptions.push(callback)
// watch here to link the subscription to the current active instance
// e.g. inside the setup of a component
const stopWatcher = watch(
() => pinia.state.value[$id],
(state) => {
if (isListening)... | JerryYuanJ/pinia | src/store.ts | TypeScript |
FunctionDeclaration |
function $reset() {
subscriptions = []
pinia.state.value[$id] = buildState()
} | JerryYuanJ/pinia | src/store.ts | TypeScript |
FunctionDeclaration | /**
* Creates a store bound to the lifespan of where the function is called. This
* means creating the store inside of a component's setup will bound it to the
* lifespan of that component while creating it outside of a component will
* create an ever living store
*
* @param partialStore - store with state return... | JerryYuanJ/pinia | src/store.ts | TypeScript |
FunctionDeclaration | /**
* Creates a `useStore` function that retrieves the store instance
* @param options - options to define the store
*/
export function defineStore<
Id extends string,
S extends StateTree,
G /* extends Record<string, StoreGetterThis> */,
A /* extends Record<string, StoreAction> */
>(options: {
id: Id
sta... | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
() => rootStateRef.value[id][key as keyof T] | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
(value) => (rootStateRef.value[id][key as keyof T] = value) | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
() => ({} as S) | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
(callback) => {
callback(
{ storeName: $id, type, payload: partialState },
pinia.state.value[$id]
)
} | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
() => pinia.state.value[$id] | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
(state) => {
if (isListening) {
subscriptions.forEach((callback) => {
callback(
{ storeName: $id, type: '🧩 in place', payload: {} },
state
)
})
}
} | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
(callback) => {
callback(
{ storeName: $id, type: '🧩 in place', payload: {} },
state
)
} | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
() => {
const idx = subscriptions.indexOf(callback)
if (idx > -1) {
subscriptions.splice(idx, 1)
stopWatcher()
}
} | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
() => pinia.state.value[$id] as S | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
(newState: S) => {
isListening = false
pinia.state.value[$id] = newState
isListening = true
} | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
() => {
setActivePinia(pinia)
// eslint-disable-next-line @typescript-eslint/no-use-before-define
return getters[getterName].call(store, store)
} | JerryYuanJ/pinia | src/store.ts | TypeScript |
ArrowFunction |
(extended, extender) => assign({}, extended, extender()) | JerryYuanJ/pinia | src/store.ts | TypeScript |
InterfaceDeclaration |
export interface HopeThemeEncryptLocaleData {
/**
* Encrypt title
*/
title: string;
/**
* Passwrod error hint
*/
errorHint: string;
} | yuyueq/hopeword | node_modules/vuepress-theme-hope/lib/shared/options/feature/encrypt.d.ts | TypeScript |
InterfaceDeclaration | /**
* Encrypt Options
*
* 加密选项
*/
export interface HopeThemeEncryptOptions {
/**
* Whether encrypt gloablly
*
* 是否全局加密
*
* @default 'local'
*/
global?: boolean;
/**
* Admin passwords, which has the highest authority
*
* 最高权限密码
*/
admin?: string | str... | yuyueq/hopeword | node_modules/vuepress-theme-hope/lib/shared/options/feature/encrypt.d.ts | TypeScript |
ArrowFunction |
() => {
++this.timeoutCounter;
this.timeoutText.innerHTML = this.timeoutCounter.toString();
} | riccoarntz/seng-disposable-manager | example/src/CustomInstance.ts | TypeScript |
ClassDeclaration |
export default class CustomInstance {
private disposableManager:DisposableManager = new DisposableManager();
private element:HTMLElement;
private timeoutCounter:number = 0;
private timeoutText:HTMLElement;
constructor(element:HTMLElement) {
this.element = element;
this.timeoutText = <HTMLElement>thi... | riccoarntz/seng-disposable-manager | example/src/CustomInstance.ts | TypeScript |
MethodDeclaration | /**
* @public
* @method startInterval
*/
public startInterval():void
{
this.disposableManager.add(
setInterval(() => {
++this.timeoutCounter;
this.timeoutText.innerHTML = this.timeoutCounter.toString();
}, 500),
);
} | riccoarntz/seng-disposable-manager | example/src/CustomInstance.ts | TypeScript |
MethodDeclaration |
public destruct() {
this.disposableManager.dispose();
} | riccoarntz/seng-disposable-manager | example/src/CustomInstance.ts | TypeScript |
ClassDeclaration |
export class Offset extends XmlComponent {
constructor() {
super("a:off");
this.root.push(
new OffsetAttributes({
x: 0,
y: 0,
}),
);
}
} | 1shaked/docx | src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/offset/off.ts | TypeScript |
FunctionDeclaration |
function handleChange(event: SyntheticEvent<HTMLInputElement>) {
handle.current.validity.valueMissing =
required === true &&
!event.currentTarget.checked &&
value.filter(v => v !== event.currentTarget.value).length === 0
onChange(event)
} | makeswift-hq/makeswift | packages/runtime/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.tsx | TypeScript |
ArrowFunction |
() => handle.current | makeswift-hq/makeswift | packages/runtime/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.tsx | TypeScript |
ArrowFunction |
v => v !== event.currentTarget.value | makeswift-hq/makeswift | packages/runtime/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.tsx | TypeScript |
ArrowFunction |
option => (
<StyledLabel key={option.id} | makeswift-hq/makeswift | packages/runtime/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.tsx | TypeScript |
TypeAliasDeclaration |
type Props = {
id: string
tableColumn: {
options: Array<{
id: string
name: string
}>
}
value?: Array<string>
label?: string
onChange: (arg0: SyntheticEvent<HTMLInputElement>) => unknown
required?: boolean
hideLabel?: boolean
} | makeswift-hq/makeswift | packages/runtime/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.tsx | TypeScript |
ClassDeclaration |
@Injectable({
providedIn: 'root',
})
export class TimeAPIService {
constructor() {}
} | justnat3/Meteo | src/app/Services/Time/time-api.service.ts | TypeScript |
ArrowFunction |
(resp) => {
this.qs.queryResult = resp;
this.qs.queryResult.status = "done";
this.showSpinner = false;
this.rows = this.qs.queryResult.getData();
let cols = this.qs.queryResult.getColumns();
cols.forEach( (col) => {
col.prop = col.name;
});
this.columns = cols; //this.qs.queryResult.... | sandyc316/redash | client/app/modules/dashboards/dashboards/component/widget.ts | TypeScript |
ArrowFunction |
(col) => {
col.prop = col.name;
} | sandyc316/redash | client/app/modules/dashboards/dashboards/component/widget.ts | TypeScript |
ArrowFunction |
(err) => {
console.log("Unable to get results for the query", err);
} | sandyc316/redash | client/app/modules/dashboards/dashboards/component/widget.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'dashboard-widget',
templateUrl: 'widget.html',
})
export class DashboardWidget {
@Input()
set widget(widget) {
if (widget) {
this._widget = widget;
if (widget.visualization) {
Object.assign(this.qs, widget.visualization.query);
this.type = widget.visualization.type;
th... | sandyc316/redash | client/app/modules/dashboards/dashboards/component/widget.ts | TypeScript |
MethodDeclaration |
getQueryResult() {
this.qs.getQueryResult(10000).subscribe((resp) => {
this.qs.queryResult = resp;
this.qs.queryResult.status = "done";
this.showSpinner = false;
this.rows = this.qs.queryResult.getData();
let cols = this.qs.queryResult.getColumns();
cols.forEach( (col) => {
col.prop = col... | sandyc316/redash | client/app/modules/dashboards/dashboards/component/widget.ts | TypeScript |
MethodDeclaration |
deleteWidget(id) {
this.removeWidget.emit(id);
} | sandyc316/redash | client/app/modules/dashboards/dashboards/component/widget.ts | TypeScript |
ArrowFunction |
() => {
performTests(config);
} | Hejwo/fablo | e2e/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.