type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
InterfaceDeclaration
interface GridTreeDataGroupingCellProps extends GridRenderCellParams<any, any, any, GridApiPro> { hideDescendantCount?: boolean; }
pkratz/mui-x
packages/grid/_modules_/grid/components/cell/GridTreeDataGroupingCell.tsx
TypeScript
TypeAliasDeclaration
type OwnerState = { classes: DataGridProProcessedProps['classes'] };
pkratz/mui-x
packages/grid/_modules_/grid/components/cell/GridTreeDataGroupingCell.tsx
TypeScript
ClassDeclaration
class PhoneListController { phones: any[]; orderProp: string; query: string; static $inject = ['Phone']; constructor(Phone: any) { this.phones = Phone.query(); this.orderProp = 'age'; } }
stevobengtson/angular-upgrade-test
app/phone-list/phone-list.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-shipping', templateUrl: './shipping.component.html', styleUrls: ['./shipping.component.css'] }) export class ShippingComponent { shippingCosts = this.cartService.getShippingPrices(); constructor(private cartService: CartService) { } }
UMM-CSci-3601-S22/angular-tutorial-krug0102
src/app/shipping/shipping.component.ts
TypeScript
ClassDeclaration
export default class CreateUserDto { readonly name: string; readonly books: number[] ; readonly username: string; readonly password: string; }
leilafakheri/DB-LAB6
src/user/dto/create-user.dto.ts
TypeScript
ArrowFunction
t => refs.isExtends(targetType, t)
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
n => { advices = advices.concat(adviceMetas[n]); }
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
n => { advices.forEach(adv => { if (adv.propertyKey !== n) { if (this.matchAspectSelf(n, adv)) { matched.push({ name: n, fullName: `${className...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
adv => { if (adv.propertyKey !== n) { if (this.matchAspectSelf(n, adv)) { matched.push({ name: n, fullName: `${className}.${n}`, ...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
name => { let advices = adviceMetas[name]; advices.forEach(metadata => { matched = matched.concat(this.filterPointcut(targetType, points, metadata)); }); }
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
metadata => { matched = matched.concat(this.filterPointcut(targetType, points, metadata)); }
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
p => match(p.name, p.fullName, type, target, p)
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
p => { return Object.assign({}, p, { advice: metadata }); }
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(method: string, fullName: string, targetType?: Type) => { if (isArray(metadata.within)) { return metadata.within.some(t => this.reflects.isExtends(targetType, t)); } else { return this.reflects.isExtends(targetType, metadata.within); ...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
t => this.reflects.isExtends(targetType, t)
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(method: string, fullName: string, targetType?: Type, target?: any) => { return metadata.target = target; }
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(method: string, fullName: string, targetType?: Type, target?: any) => { return this.reflects.hasMethodMetadata(metadata.annotation, targetType, method); }
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(name: string, fullName: string, targetType?: Type) => { let decName = Reflect.getMetadataKeys(type, name); return decName.some(n => isString(n) && pointcutReg.test(n)); }
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
n => isString(n) && pointcutReg.test(n)
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(name: string, fullName: string) => pointcutReg.test(fullName)
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(name: string, fullName: string) => { if (name === 'constructor') { return this.reflects.hasMetadata(annotation, type); } return this.reflects.hasMethodMetadata(annotation, type, name); }
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(name: string, fullName: string) => !!name && !this.reflects.hasMetadata(Aspect, type)
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(name: string, fullName: string) => matcher.test(fullName)
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
n => n.trim()
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(name: string, fullName: string, targetType?: Type) => classnames.indexOf(lang.getClassName(targetType)) >= 0
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(name: string, fullName: string, targetType?: Type) => this.reflects.getInjector(type).getTokenProvider(torken) === targetType
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(method: string, fullName: string, targetType?: Type, pointcut?: IPointcut) => { let flag; expresses.forEach((express, idx) => { if (isDefined(flag)) { return; } if (isFunction(express)) { let rel = express(...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
(express, idx) => { if (isDefined(flag)) { return; } if (isFunction(express)) { let rel = express(method, fullName, targetType, pointcut); if (idx < expresses.length - 2) { if (!rel && ex...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
TypeAliasDeclaration
/** * match express. */ export type MatchExpress = (method: string, fullName: string, targetType?: Type, target?: any, pointcut?: IPointcut) => boolean;
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
MethodDeclaration
match(aspectType: Type, targetType: Type, adviceMetas?: ObjectMap<AdviceMetadata[]>, target?: any): MatchPointcut[] { let refs = this.reflects; let aspectMeta = lang.first(refs.getMetadata<AspectMetadata>(Aspect, aspectType)); if (aspectMeta) { if (aspectMeta.without) { ...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
MethodDeclaration
protected matchAspectSelf(name: string, metadata: AdviceMetadata): boolean { if (metadata.pointcut) { let pointcut = metadata.pointcut; if (isString(pointcut)) { if (executionChkExp.test(pointcut)) { pointcut = pointcut.substring(10, pointcut.length ...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
MethodDeclaration
filterPointcut(type: Type, points: IPointcut[], metadata: AdviceMetadata, target?: any): MatchPointcut[] { if (!metadata.pointcut) { return []; } let matchedPointcut; if (metadata.pointcut) { let match = this.matchTypeFactory(type, metadata); matchedP...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
MethodDeclaration
protected matchTypeFactory(type: Type, metadata: AdviceMetadata): MatchExpress { let pointcut = metadata.pointcut; let expresses: (MatchExpress | string)[] = []; if (metadata.within) { expresses.push((method: string, fullName: string, targetType?: Type) => { if (isAr...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
MethodDeclaration
protected spiltBrace(strExp: string) { strExp = strExp.trim(); if (preParam.test(strExp) && endParam.test(strExp)) { strExp = strExp.substring(1, strExp.length - 1).trim(); } if (preParam.test(strExp) && endParam.test(strExp)) { return this.spiltBrace(strExp); ...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
MethodDeclaration
protected expressToFunc(type: Type, strExp: string): MatchExpress { if (annContentExp.test(strExp)) { let exp = strExp.substring(12, strExp.length - 1); let annotation = aExp.test(exp) ? exp : ('@' + exp); return (name: string, fullName: string) => { if (name...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
MethodDeclaration
protected tranlateExpress(type: Type, strExp: string): MatchExpress { let expresses: ((MatchExpress) | string)[] = []; let idxOr = strExp.indexOf('||'); let idxAd = strExp.indexOf('&&'); if (idxAd < 0 && idxOr < 0) { expresses.push(this.expressToFunc(type, this.spiltBrace(s...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
MethodDeclaration
protected mergeExpress(...expresses: (MatchExpress | string)[]): MatchExpress { return (method: string, fullName: string, targetType?: Type, pointcut?: IPointcut) => { let flag; expresses.forEach((express, idx) => { if (isDefined(flag)) { return; ...
zhouhoujun/tsioc
packages/aop/src/AdviceMatcher.ts
TypeScript
ArrowFunction
() => this.update()
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ArrowFunction
ch => { this.callOnModel.push(this.editor.addTypingListener(ch, this.trigger.bind(this, ch))); }
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ArrowFunction
(e: editorCommon.IModelContentChangedEvent) => { if (e.changeType === editorCommon.EventType.ModelRawContentChangedFlush) { // a model.setValue() was called canceled = true; } else if (e.changeType === editorCommon.EventType.ModelRawContentChangedLineChanged) { var changedLine = (<editorCommon.IModel...
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ArrowFunction
edits => { return this.workerService.computeMoreMinimalEdits(model.uri, edits, []); }
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ArrowFunction
edits => { unbind.dispose(); if (canceled || isFalsyOrEmpty(edits)) { return; } this.editor.executeCommand(this.getId(), new EditOperationsCommand(edits, this.editor.getSelection())); }
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ArrowFunction
(err) => { unbind.dispose(); throw err; }
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ArrowFunction
edits => workerService.computeMoreMinimalEdits(editor.getModel().uri, edits, editor.getSelections())
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ArrowFunction
edits => { if (!state.validate(editor) || isFalsyOrEmpty(edits)) { return; } const command = new EditOperationsCommand(edits, editor.getSelection()); editor.executeCommand(this.id, command); editor.focus(); }
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ArrowFunction
accessor => { const editor = accessor.get(ICodeEditorService).getFocusedCodeEditor(); if (editor) { return new class extends AbstractFormatAction { constructor() { super(<any>{}); } _getFormattingEdits(editor: editorCommon.ICommonCodeEditor): TPromise<editorCommon.ISingleEditOperation[]> { const m...
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ClassDeclaration
@commonEditorContribution class FormatOnType implements editorCommon.IEditorContribution { private static ID = 'editor.contrib.autoFormat'; private editor: editorCommon.ICommonCodeEditor; private workerService: IEditorWorkerService; private callOnDispose: IDisposable[]; private callOnModel: IDisposable[]; con...
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ClassDeclaration
export abstract class AbstractFormatAction extends EditorAction { public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): TPromise<void> { const workerService = accessor.get(IEditorWorkerService); const formattingPromise = this._getFormattingEdits(editor); if (!formattingPromise) { ...
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ClassDeclaration
@editorAction export class FormatDocumentAction extends AbstractFormatAction { constructor() { super({ id: 'editor.action.formatDocument', label: nls.localize('formatDocument.label', "Format Document"), alias: 'Format Document', precondition: ContextKeyExpr.and(EditorContextKeys.Writable, ModeContextKe...
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ClassDeclaration
@editorAction export class FormatSelectionAction extends AbstractFormatAction { constructor() { super({ id: 'editor.action.formatSelection', label: nls.localize('formatSelection.label', "Format Selection"), alias: 'Format Code', precondition: ContextKeyExpr.and(EditorContextKeys.Writable, ModeContextKe...
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
MethodDeclaration
private update(): void { // clean up this.callOnModel = dispose(this.callOnModel); // we are disabled if (!this.editor.getConfiguration().contribInfo.formatOnType) { return; } // no model if (!this.editor.getModel()) { return; } var model = this.editor.getModel(); // no support var [su...
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
MethodDeclaration
private trigger(ch: string): void { if (this.editor.getSelections().length > 1) { return; } var model = this.editor.getModel(), position = this.editor.getPosition(), canceled = false; // install a listener that checks if edits happens before the // position on which we format right now. If so, we...
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
MethodDeclaration
public getId(): string { return FormatOnType.ID; }
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
MethodDeclaration
public dispose(): void { this.callOnDispose = dispose(this.callOnDispose); this.callOnModel = dispose(this.callOnModel); }
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
MethodDeclaration
public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): TPromise<void> { const workerService = accessor.get(IEditorWorkerService); const formattingPromise = this._getFormattingEdits(editor); if (!formattingPromise) { return TPromise.as(void 0); } // Capture the state of the edit...
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
MethodDeclaration
protected abstract _getFormattingEdits(editor: editorCommon.ICommonCodeEditor): TPromise<editorCommon.ISingleEditOperation[]>;
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
MethodDeclaration
protected _getFormattingEdits(editor: editorCommon.ICommonCodeEditor): TPromise<editorCommon.ISingleEditOperation[]> { const model = editor.getModel(); const { tabSize, insertSpaces} = model.getOptions(); return getDocumentFormattingEdits(model, { tabSize, insertSpaces }); }
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
MethodDeclaration
protected _getFormattingEdits(editor: editorCommon.ICommonCodeEditor): TPromise<editorCommon.ISingleEditOperation[]> { const model = editor.getModel(); const { tabSize, insertSpaces} = model.getOptions(); return getDocumentRangeFormattingEdits(model, editor.getSelection(), { tabSize, insertSpaces }); }
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
MethodDeclaration
_getFormattingEdits(editor: editorCommon.ICommonCodeEditor): TPromise<editorCommon.ISingleEditOperation[]> { const model = editor.getModel(); const editorSelection = editor.getSelection(); const {tabSize, insertSpaces } = model.getOptions(); return editorSelection.isEmpty() ? getDocumentFormattin...
Jekk123/vscode
src/vs/editor/contrib/format/common/formatActions.ts
TypeScript
ArrowFunction
(o, item) => { o[item.column_name] = item.column_type.match(/enum\((.*)\)/)[1].split(',').map((item: string) => item.match(/'(.*)'/)![1]); return o; }
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
ArrowFunction
(item: string) => item.match(/'(.*)'/)![1]
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
ArrowFunction
col => ({ name: col.column_name, type: col.data_type, maxLength: col.length, defaultValue: col.column_default, nullable: col.is_nullable === 'YES', primary: col.column_key === 'PRI', unique: col.column_key === 'UNI', })
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
ArrowFunction
index => ({ columnName: index.Column_name, keyName: index.Key_name, unique: !index.Non_unique, primary: index.Key_name === 'PRIMARY', })
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
ClassDeclaration
export class MySqlSchemaHelper extends SchemaHelper { static readonly TYPES = { boolean: ['tinyint(1)', 'tinyint'], number: ['int(?)', 'int', 'float', 'double', 'tinyint', 'smallint'], float: ['float'], double: ['double'], tinyint: ['tinyint'], smallint: ['smallint'], Date: ['datetime(?)...
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
getSchemaBeginning(charset: string): string { return `set names ${charset};\nset foreign_key_checks = 0;\n\n`; }
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
getSchemaEnd(): string { return 'set foreign_key_checks = 1;\n'; }
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
finalizeTable(table: CreateTableBuilder, charset: string): void { table.engine('InnoDB'); table.charset(charset); }
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
getTypeDefinition(prop: EntityProperty): string { return super.getTypeDefinition(prop, MySqlSchemaHelper.TYPES, MySqlSchemaHelper.DEFAULT_TYPE_LENGTHS); }
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
getTypeFromDefinition(type: string, defaultType: string): string { return super.getTypeFromDefinition(type, defaultType, MySqlSchemaHelper.TYPES); }
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
getListTablesSQL(): string { return `select table_name as table_name from information_schema.tables where table_type = 'BASE TABLE' and table_schema = schema()`; }
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
getRenameColumnSQL(tableName: string, from: Column, to: EntityProperty, idx = 0): string { const type = `${to.columnTypes[idx]}${to.unsigned ? ' unsigned' : ''} ${to.nullable ? 'null' : 'not null'}${to.default ? ' default ' + to.default : ''}`; return `alter table \`${tableName}\` change \`${from.name}\` \`${t...
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
getForeignKeysSQL(tableName: string, schemaName?: string): string { return `select distinct k.constraint_name, k.column_name, k.referenced_table_name, k.referenced_column_name, c.update_rule, c.delete_rule ` + `from information_schema.key_column_usage k ` + `inner join information_schema.referential_co...
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
async getEnumDefinitions(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<Dictionary> { const sql = `select column_name as column_name, column_type as column_type from information_schema.columns where data_type = 'enum' and table_name = '${tableName}'`; const enums = a...
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
async getColumns(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<any[]> { const sql = `select column_name as column_name, column_default as column_default, is_nullable as is_nullable, data_type as data_type, column_key as column_key, ifnull(datetime_precision, character_maximum_...
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
async getIndexes(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<Index[]> { const sql = `show index from \`${tableName}\``; const indexes = await connection.execute<any[]>(sql); return indexes.map(index => ({ columnName: index.Column_name, keyName: index.Key...
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
isSame(prop: EntityProperty, column: Column, idx?: number): IsSame { return super.isSame(prop, column, idx, MySqlSchemaHelper.TYPES, MySqlSchemaHelper.DEFAULT_VALUES); }
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
MethodDeclaration
normalizeDefaultValue(defaultValue: string, length: number) { return super.normalizeDefaultValue(defaultValue, length, MySqlSchemaHelper.DEFAULT_VALUES); }
0ttik/mikro-orm
lib/schema/MySqlSchemaHelper.ts
TypeScript
ArrowFunction
() => { cy.loadConfig({}, "applicationConfigFilled.json", { confirmationId: "123" }) cy.visit(route) }
elenm/bloom
sites/public/cypress/integration/pages/application/review/confirmation.spec.ts
TypeScript
ArrowFunction
({ beforeAllExtend, afterAllExtend, afterEachExtend, beforeEachExtend, }: { beforeAllExtend?: () => Promise<void> | void; afterAllExtend?: () => Promise<void> | void; afterEachExtend?: () => Promise<void> | void; beforeEachExtend?: () => Promise<void> | void; } = {}) => { let dateNowSpy: SpyInstance;...
g3f4-xyz/lifeapp-server
src/utils/tests/setupMongo.ts
TypeScript
ArrowFunction
async () => { // @ts-ignore mongoConnection = await connectDB(global.__MONGO_URI__); dateNowSpy = jest .spyOn(Date, 'now') .mockImplementation(() => 1570032448857); if (beforeAllExtend) { await beforeAllExtend(); } }
g3f4-xyz/lifeapp-server
src/utils/tests/setupMongo.ts
TypeScript
ArrowFunction
() => 1570032448857
g3f4-xyz/lifeapp-server
src/utils/tests/setupMongo.ts
TypeScript
ArrowFunction
async () => { if (beforeEachExtend) { await beforeEachExtend(); } }
g3f4-xyz/lifeapp-server
src/utils/tests/setupMongo.ts
TypeScript
ArrowFunction
async () => { if (afterEachExtend) { await afterEachExtend(); } await Promise.all( mongoConnection.connections.map(collection => collection.dropDatabase()), ); }
g3f4-xyz/lifeapp-server
src/utils/tests/setupMongo.ts
TypeScript
ArrowFunction
collection => collection.dropDatabase()
g3f4-xyz/lifeapp-server
src/utils/tests/setupMongo.ts
TypeScript
ArrowFunction
async () => { dateNowSpy.mockRestore(); if (afterAllExtend) { await afterAllExtend(); } await mongoConnection.disconnect(); }
g3f4-xyz/lifeapp-server
src/utils/tests/setupMongo.ts
TypeScript
InterfaceDeclaration
/** BasePicker component. */ export interface IBasePicker<T> { /** Gets the current value of the input. */ items: T[] | undefined; /** Sets focus to the focus zone. */ focus: () => void; /** Set focus to the input */ focusInput: () => void; }
VamshidharReddyEnumula/office-ui-fabric-react
packages/office-ui-fabric-react/src/components/pickers/BasePicker.types.ts
TypeScript
InterfaceDeclaration
// Type T is the type of the item that is displayed // and searched for by the picker. For example, if the picker is // displaying persona's then type T could either be of Persona or IPersona props export interface IBasePickerProps<T> extends React.Props<any> { /** * Optional callback to access the IBasePicker int...
VamshidharReddyEnumula/office-ui-fabric-react
packages/office-ui-fabric-react/src/components/pickers/BasePicker.types.ts
TypeScript
InterfaceDeclaration
export interface IBasePickerSuggestionsProps { /** * Function that specifies what to render when no results are found. */ onRenderNoResultFound?: IRenderFunction<void>; /** * The text that should appear at the top of the suggestion box. */ suggestionsHeaderText?: string; /** * The text that ...
VamshidharReddyEnumula/office-ui-fabric-react
packages/office-ui-fabric-react/src/components/pickers/BasePicker.types.ts
TypeScript
InterfaceDeclaration
/** Pickers' input props interface */ export interface IInputProps extends React.InputHTMLAttributes<HTMLInputElement> { /** * Screen reader label to apply to an input element. */ 'aria-label'?: string; /** * The default value to be visible when the autofill first created. * This is different than pl...
VamshidharReddyEnumula/office-ui-fabric-react
packages/office-ui-fabric-react/src/components/pickers/BasePicker.types.ts
TypeScript
InterfaceDeclaration
/** Represents the stylable areas of the control. */ export interface IBasePickerStyles { /** Root element of any picker extending from BasePicker (wraps all the elements). */ root: IStyle; /** Refers to the elements already selected(picked) wrapped by `itemsWrapper` along with the input to type new selection. *...
VamshidharReddyEnumula/office-ui-fabric-react
packages/office-ui-fabric-react/src/components/pickers/BasePicker.types.ts
TypeScript
EnumDeclaration
/** Validation state of the user's input. */ export enum ValidationState { /** User input is valid. */ valid, /** User input could be valid or invalid, its state is not known yet. */ warning, /** User input is invalid. */ invalid }
VamshidharReddyEnumula/office-ui-fabric-react
packages/office-ui-fabric-react/src/components/pickers/BasePicker.types.ts
TypeScript
TypeAliasDeclaration
/** The props needed to construct styles. */ export type IBasePickerStyleProps = Pick<IBasePickerProps<any>, 'theme' | 'className'> & { /** Whether text style area is focused */ isFocused?: boolean; /** Optional pickerInput className */ inputClassName?: string; };
VamshidharReddyEnumula/office-ui-fabric-react
packages/office-ui-fabric-react/src/components/pickers/BasePicker.types.ts
TypeScript
ArrowFunction
(creep) => creep.memory.role === e
Kendalor/screeps-AI
src/legacy/SpawnConfigAutoSpawn.ts
TypeScript
InterfaceDeclaration
export interface SpawnConfig { currentPopulation:{ [role: string]: number}; targetPopulation:{ [role: string]: number}; presets: {[role: string]: BodyPartConstant[]}; }
Kendalor/screeps-AI
src/legacy/SpawnConfigAutoSpawn.ts
TypeScript
MethodDeclaration
public readPresetsFromRoom(room: Room){ // MINER let energyCap: number = room.energyCapacityAvailable; let moveParts: number = 1; let carryParts: number = 1; let workParts: number = 2; if (energyCap >= 950) {moveParts=6;carryParts=1;workParts=6;} if (energ...
Kendalor/screeps-AI
src/legacy/SpawnConfigAutoSpawn.ts
TypeScript
MethodDeclaration
public readPresetsFromMemory(room: Room) { for(const e of this.roles) { this.presets[e]= room.memory.SpawnConfigAutoSpawn.presets[e]; } }
Kendalor/screeps-AI
src/legacy/SpawnConfigAutoSpawn.ts
TypeScript
MethodDeclaration
public readCurrentPopulationFromRoom(room: Room): void { for(const e of this.roles) { this.currentPopulation[e]= room.memory.SpawnConfigAutoSpawn.currentPopulation[e] = room.find(FIND_MY_CREEPS).filter((creep) => creep.memory.role === e).length; } }
Kendalor/screeps-AI
src/legacy/SpawnConfigAutoSpawn.ts
TypeScript
MethodDeclaration
public readTargetPopulationFromRoom(room: Room): void { if (room.storage === undefined) { room.memory.SpawnConfigAutoSpawn.targetPopulation.miner = this.targetPopulation.miner = 2; if(room.energyCapacityAvailable >= 700){ room.memory.SpawnConfigAutoSpawn.targetPopulation...
Kendalor/screeps-AI
src/legacy/SpawnConfigAutoSpawn.ts
TypeScript
MethodDeclaration
public readTargetPopulationFromMemory(room: Room): void { for(const e of this.roles) { this.targetPopulation[e]= room.memory.SpawnConfigAutoSpawn.targetPopulation[e]; } }
Kendalor/screeps-AI
src/legacy/SpawnConfigAutoSpawn.ts
TypeScript
MethodDeclaration
public initValues(room: Room): void { for(const e of this.roles) { this.targetPopulation[e]= room.memory.SpawnConfigAutoSpawn.targetPopulation[e] = 0; this.currentPopulation[e]= room.memory.SpawnConfigAutoSpawn.currentPopulation[e] = 0; } }
Kendalor/screeps-AI
src/legacy/SpawnConfigAutoSpawn.ts
TypeScript