type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
private _isDynamicallyLoadedComponentKey(key: Key): boolean {
return isPresent(this._dynamicallyCreatedComponentBinding) &&
key.id === this._dynamicallyCreatedComponentBinding.key.id;
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
_new(binding: ResolvedBinding): any {
if (this._constructionCounter++ > this._strategy.getMaxDirectives()) {
throw new CyclicDependencyError(binding.key);
}
var factory = binding.factory;
var deps = <List<DirectiveDependency>>binding.dependencies;
var length = deps.length;
var d0, d1, d... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _getByDependency(dep: DependencyWithVisibility, requestor: Key): any {
if (!(dep instanceof DirectiveDependency)) {
return this._getByKey(dep.key, dep.visibility, dep.optional, requestor);
}
var dirDep = <DirectiveDependency>dep;
if (isPresent(dirDep.attributeName)) return this._buildAt... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _buildAttribute(dep: DirectiveDependency): string {
var attributes = this._proto.attributes;
if (isPresent(attributes) && MapWrapper.contains(attributes, dep.attributeName)) {
return MapWrapper.get(attributes, dep.attributeName);
} else {
return null;
}
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
_buildQueriesForDeps(deps: List<DirectiveDependency>): void {
for (var i = 0; i < deps.length; i++) {
var dep = deps[i];
if (isPresent(dep.queryDirective)) {
this._createQueryRef(dep.queryDirective);
}
}
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _createQueryRef(directive): void {
var queryList = new QueryList<any>();
if (isBlank(this._query0)) {
this._query0 = new QueryRef(directive, queryList, this);
} else if (isBlank(this._query1)) {
this._query1 = new QueryRef(directive, queryList, this);
} else if (isBlank(this._query2... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _addToQueries(obj, token): void {
if (isPresent(this._query0) && (this._query0.directive === token)) {
this._query0.list.add(obj);
}
if (isPresent(this._query1) && (this._query1.directive === token)) {
this._query1.list.add(obj);
}
if (isPresent(this._query2) && (this._query2.di... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration | // TODO(rado): unify with _addParentQueries.
private _inheritQueries(parent: ElementInjector): void {
if (isBlank(parent)) return;
if (isPresent(parent._query0)) {
this._query0 = parent._query0;
}
if (isPresent(parent._query1)) {
this._query1 = parent._query1;
}
if (isPresent(parent.... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _buildQueries(): void {
if (isPresent(this._proto)) {
this._strategy.buildQueries();
}
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _findQuery(token): QueryRef {
if (isPresent(this._query0) && this._query0.directive === token) {
return this._query0;
}
if (isPresent(this._query1) && this._query1.directive === token) {
return this._query1;
}
if (isPresent(this._query2) && this._query2.directive === token) {
... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
link(parent: ElementInjector): void {
parent.addChild(this);
this._addParentQueries();
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
linkAfter(parent: ElementInjector, prevSibling: ElementInjector): void {
parent.addChildAfter(this, prevSibling);
this._addParentQueries();
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _addParentQueries(): void {
if (isPresent(this.parent._query0)) {
this._addQueryToTree(this.parent._query0);
this.parent._query0.update();
}
if (isPresent(this.parent._query1)) {
this._addQueryToTree(this.parent._query1);
this.parent._query1.update();
}
if (isPresent... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
unlink(): void {
var queriesToUpDate = [];
if (isPresent(this.parent._query0)) {
this._pruneQueryFromTree(this.parent._query0);
ListWrapper.push(queriesToUpDate, this.parent._query0);
}
if (isPresent(this.parent._query1)) {
this._pruneQueryFromTree(this.parent._query1);
ListWrap... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _pruneQueryFromTree(query: QueryRef): void {
this._removeQueryRef(query);
var child = this._head;
while (isPresent(child)) {
child._pruneQueryFromTree(query);
child = child._next;
}
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _addQueryToTree(query: QueryRef): void {
this._assignQueryRef(query);
var child = this._head;
while (isPresent(child)) {
child._addQueryToTree(query);
child = child._next;
}
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _assignQueryRef(query: QueryRef): void {
if (isBlank(this._query0)) {
this._query0 = query;
return;
} else if (isBlank(this._query1)) {
this._query1 = query;
return;
} else if (isBlank(this._query2)) {
this._query2 = query;
return;
}
throw new QueryError(... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _removeQueryRef(query: QueryRef): void {
if (this._query0 == query) this._query0 = null;
if (this._query1 == query) this._query1 = null;
if (this._query2 == query) this._query2 = null;
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _getByKey(key: Key, visibility: Visibility, optional: boolean, requestor: Key): any {
var ei = this;
var currentVisibility = this._isComponentKey(requestor) ?
LIGHT_DOM_AND_SHADOW_DOM : // component can access both shadow dom
... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _appInjector(requestor: Key): Injector {
if (isPresent(requestor) &&
(this._isComponentKey(requestor) || this._isDynamicallyLoadedComponentKey(requestor))) {
return this._shadowDomAppInjector;
} else {
return this._lightDomAppInjector;
}
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _getPreBuiltObjectByKeyId(keyId: number): any {
var staticKeys = StaticKeys.instance();
if (keyId === staticKeys.viewManagerId) return this._preBuiltObjects.viewManager;
return _undefined;
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
private _getObjByKeyId(keyId: number, visibility: number) {
return this._strategy.getObjByKeyId(keyId, visibility);
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getDirectiveAtIndex(index: number) { return this._strategy.getDirectiveAtIndex(index); } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
hasInstances(): boolean { return this._constructionCounter > 0; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration | /** Gets whether this element is exporting a component instance as $implicit. */
isExportingComponent(): boolean { return this._proto.exportComponent; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration | /** Gets whether this element is exporting its element as $implicit. */
isExportingElement(): boolean { return this._proto.exportElement; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration | /** Get the name to which this element's $implicit is to be assigned. */
getExportImplicitName(): string { return this._proto.exportImplicitName; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getLightDomAppInjector(): Injector { return this._lightDomAppInjector; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getShadowDomAppInjector(): Injector { return this._shadowDomAppInjector; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getHost(): ElementInjector { return this._host; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getBoundElementIndex(): number { return this._proto.index; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
callOnDestroy(): void {
var p = this._protoStrategy;
if (p._binding0 instanceof DirectiveBinding && (<DirectiveBinding>p._binding0).callOnDestroy) {
this._obj0.onDestroy();
}
if (p._binding1 instanceof DirectiveBinding && (<DirectiveBinding>p._binding1).callOnDestroy) {
this._obj1.onDestro... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
clearInstances(): void {
this._obj0 = null;
this._obj1 = null;
this._obj2 = null;
this._obj3 = null;
this._obj4 = null;
this._obj5 = null;
this._obj6 = null;
this._obj7 = null;
this._obj8 = null;
this._obj9 = null;
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
hydrate(): void {
var p = this._protoStrategy;
if (isPresent(p._keyId0)) this.getObjByKeyId(p._keyId0, LIGHT_DOM_AND_SHADOW_DOM);
if (isPresent(p._keyId1)) this.getObjByKeyId(p._keyId1, LIGHT_DOM_AND_SHADOW_DOM);
if (isPresent(p._keyId2)) this.getObjByKeyId(p._keyId2, LIGHT_DOM_AND_SHADOW_DOM);
if... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getComponent(): any { return this._obj0; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
isComponentKey(key: Key): boolean {
return this._ei._proto._firstBindingIsComponent && isPresent(key) &&
key.id === this._protoStrategy._keyId0;
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
buildQueries(): void {
var p = this._protoStrategy;
if (p._binding0 instanceof DirectiveBinding) {
this._ei._buildQueriesForDeps(<List<DirectiveDependency>>p._binding0.dependencies);
}
if (p._binding1 instanceof DirectiveBinding) {
this._ei._buildQueriesForDeps(<List<DirectiveDependency>>p.... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getObjByKeyId(keyId: number, visibility: number): any {
var p = this._protoStrategy;
if (p._keyId0 === keyId && (p._visibility0 & visibility) > 0) {
if (isBlank(this._obj0)) {
this._obj0 = this._ei._new(p._binding0);
}
return this._obj0;
}
if (p._keyId1 === keyId && (p._visib... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getDirectiveAtIndex(index: number) {
if (index == 0) return this._obj0;
if (index == 1) return this._obj1;
if (index == 2) return this._obj2;
if (index == 3) return this._obj3;
if (index == 4) return this._obj4;
if (index == 5) return this._obj5;
if (index == 6) return this._obj6;
if (i... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getComponentBinding(): DirectiveBinding {
return <DirectiveBinding>this._protoStrategy._binding0;
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getMaxDirectives(): number { return _MAX_DIRECTIVE_CONSTRUCTION_COUNTER; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
callOnDestroy(): void {
var p = this._protoStrategy;
for (var i = 0; i < p._bindings.length; i++) {
if (p._bindings[i] instanceof DirectiveBinding &&
(<DirectiveBinding>p._bindings[i]).callOnDestroy) {
this._objs[i].onDestroy();
}
}
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
clearInstances(): void { ListWrapper.fill(this._objs, null); } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
hydrate(): void {
var p = this._protoStrategy;
for (var i = 0; i < p._keyIds.length; i++) {
if (isPresent(p._keyIds[i])) {
this.getObjByKeyId(p._keyIds[i], LIGHT_DOM_AND_SHADOW_DOM);
}
}
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getComponent(): any { return this._objs[0]; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
isComponentKey(key: Key): boolean {
return this._ei._proto._firstBindingIsComponent && isPresent(key) &&
key.id === this._protoStrategy._keyIds[0];
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
buildQueries(): void {
var p = this._protoStrategy;
for (var i = 0; i < p._bindings.length; i++) {
if (p._bindings[i] instanceof DirectiveBinding) {
this._ei._buildQueriesForDeps(<List<DirectiveDependency>>p._bindings[i].dependencies);
}
}
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getObjByKeyId(keyId: number, visibility: number): any {
var p = this._protoStrategy;
// TODO(vicb): optimize lookup ?
for (var i = 0; i < p._keyIds.length; i++) {
if (p._keyIds[i] === keyId && (p._visibilities[i] & visibility) > 0) {
if (isBlank(this._objs[i])) {
this._objs[i] = th... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getDirectiveAtIndex(index: number): any {
if (index < 0 || index >= this._objs.length) {
throw new OutOfBoundsAccess(index);
}
return this._objs[index];
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getComponentBinding(): DirectiveBinding {
return <DirectiveBinding>this._protoStrategy._bindings[0];
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
getMaxDirectives(): number { return this._objs.length; } | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
update(): void {
var aggregator = [];
this.visit(this.originator, aggregator);
this.list.reset(aggregator);
} | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
MethodDeclaration |
visit(inj: ElementInjector, aggregator): void {
if (isBlank(inj)) return;
if (inj.hasDirective(this.directive)) {
ListWrapper.push(aggregator, inj.get(this.directive));
}
var child = inj._head;
while (isPresent(child)) {
this.visit(child, aggregator);
child = child._next;
}
... | MiisterPatate/planning | node_modules/angular2/atscript/src/core/compiler/element_injector.ts | TypeScript |
ClassDeclaration |
@NgModule({
declarations: [
ProfileComponent,
BankComponent,
CollateralComponent,
FamilyComponent,
InstallmentComponent,
WorkComponent,
BusinessComponent,
OtherIncomeComponent,
OtherIncomeOneComponent,
OtherIncomeTwoComponent,
PersonalComponent,
SupportComponent
... | arifakhriwilaga/masskredit | src/app/dashboard/profile/index.ts | TypeScript |
FunctionDeclaration |
function createComponent(): ReactWrapper<{}, IKeyboardContext> {
return mount(
<KeyboardManager>
<div className="child">Hello - I am a child component</div>
</KeyboardManager>,
);
} | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const registrationManagerMock = KeyboardRegistrationManager as jest.Mocked<typeof KeyboardRegistrationManager>;
let wrapper: ReactWrapper<{}, IKeyboardContext> = null;
let addEventListenerSpy: jest.SpyInstance = null;
let removeEventListenerSpy: jest.SpyInstance = null;
function createComp... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
(registrationManagerMock.prototype.invokeHandler as any).mockClear();
addEventListenerSpy = jest.spyOn(window, "addEventListener");
removeEventListenerSpy = jest.spyOn(window, "removeEventListener");
wrapper = createComponent();
} | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(wrapper).not.toBeNull();
} | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(wrapper.state().keyboard).toBeInstanceOf(KeyboardRegistrationManager);
} | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(addEventListenerSpy).toBeCalled();
expect(removeEventListenerSpy).toBeCalled();
} | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(wrapper.find(".child").exists()).toBe(true);
} | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyDown, {
ctrlKey: true,
key: "1",
});
window.dispatchEvent(keyboardEvent);
expect(registrationManagerMock.prototype.invokeHandler)
.toBeCalledWith(KeyEventType.K... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyUp, {
ctrlKey: true,
key: "1",
});
window.dispatchEvent(keyboardEvent);
expect(registrationManagerMock.prototype.invokeHandler)
.toBeCalledWith(KeyEventType.Key... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyPress, {
ctrlKey: true,
key: "1",
});
window.dispatchEvent(keyboardEvent);
expect(registrationManagerMock.prototype.invokeHandler)
.toBeCalledWith(KeyEventType.... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyDown, {
ctrlKey: false,
altKey: true,
key: "1",
});
window.dispatchEvent(keyboardEvent);
expect(registrationManagerMock.prototype.invokeHandler)
... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyUp, {
ctrlKey: false,
altKey: true,
key: "1",
});
window.dispatchEvent(keyboardEvent);
expect(registrationManagerMock.prototype.invokeHandler)
.... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyPress, {
ctrlKey: false,
altKey: true,
key: "1",
});
window.dispatchEvent(keyboardEvent);
expect(registrationManagerMock.prototype.invokeHandler)
... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyDown, {
ctrlKey: false,
altKey: false,
key: "F1",
});
window.dispatchEvent(keyboardEvent);
expect(registrationManagerMock.prototype.invokeHandler)
... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyUp, {
ctrlKey: false,
altKey: false,
key: "F1",
});
window.dispatchEvent(keyboardEvent);
expect(registrationManagerMock.prototype.invokeHandler)
... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyPress, {
ctrlKey: false,
altKey: false,
key: "F1",
});
window.dispatchEvent(keyboardEvent);
expect(registrationManagerMock.prototype.invokeHandler)
... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
it("ignores keyboard events when UI is focused on an input element", () => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyPress, {
ctrlKey: false,
altKey: false,
key: "a",
});
... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyPress, {
ctrlKey: false,
altKey: false,
key: "a",
});
Object.defineProperty(document, "activeElement", {
get: jest.fn(() ... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => document.createElement("input") | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyPress, {
ctrlKey: false,
altKey: false,
key: "a",
});
Object.defineProperty(document, "activeElement", {
get: jest.fn(() ... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => document.createElement("textarea") | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyPress, {
ctrlKey: false,
altKey: false,
key: "a",
});
Object.defineProperty(document, "activeElement", {
get: jest.fn(() ... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => document.createElement("select") | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => {
const keyboardEvent = new KeyboardEvent(
KeyEventType.KeyPress, {
ctrlKey: false,
altKey: false,
key: "a",
});
Object.defineProperty(document, "activeElement", {
get: jest.fn(() ... | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
ArrowFunction |
() => document.createElement("button") | open-flex/VoTT | src/react/components/common/keyboardManager/keyboardManager.test.tsx | TypeScript |
FunctionDeclaration |
function TeacherList() {
const [teachers, setTeachers] = useState([]);
const [subject, setSubject] = useState("");
const [week_day, setWeek_day] = useState("");
const [time, setTime] = useState("");
async function searchTeachers(e: FormEvent) {
e.preventDefault();
const response =... | CharlesLB/proffy | web/src/pages/TeacherList/index.tsx | TypeScript |
FunctionDeclaration |
async function searchTeachers(e: FormEvent) {
e.preventDefault();
const response = await api.get("classes", {
params: {
subject,
week_day,
time,
},
});
setTeachers(response.data);
} | CharlesLB/proffy | web/src/pages/TeacherList/index.tsx | TypeScript |
ArrowFunction |
(teacher: Teacher) => {
return <TeacherItem key={teacher.id} teacher={teacher} />;
} | CharlesLB/proffy | web/src/pages/TeacherList/index.tsx | TypeScript |
ClassDeclaration | /* tslint:disable:jsx-no-multiline-js jsx-no-lambda no-string-literal */
export class AppGridPage extends MapComponent<IAppGridPageProps, IAppGridPageState> {
constructor(props: IAppGridPageProps, context?: any) {
super(props, context);
this.state = {
hidden: false
};
}
... | xprst/xprst-com | src/component/MapComponent/newMap/grid/AppGridPage.tsx | TypeScript |
InterfaceDeclaration | // tslint:disable-next-line:no-empty-interface
export interface IAppGridPageProps extends IBaseProps {
} | xprst/xprst-com | src/component/MapComponent/newMap/grid/AppGridPage.tsx | TypeScript |
InterfaceDeclaration | // tslint:disable-next-line:no-empty-interface
export interface IAppGridPageState extends IBaseState {
} | xprst/xprst-com | src/component/MapComponent/newMap/grid/AppGridPage.tsx | TypeScript |
MethodDeclaration |
render() {
return (
<div className="map-simple-pager">
<div className="el-pagination">
<div className="el-pagination__rightwrapper">
<Button type="default">
<Icon type="left" style={{ color: 'rgb(228, 228, 228)'... | xprst/xprst-com | src/component/MapComponent/newMap/grid/AppGridPage.tsx | TypeScript |
ClassDeclaration |
@Injectable({ providedIn: 'root' })
export class NgLodgingsDoorwaysEpics extends RecordEpicsBase<LodgingDoorway, LodgingDoorwayKey> {
constructor(
protected requests: NgLodgingsDoorwaysRequests,
protected notifications: NgLodgingsDoorwaysNotifications,
private lodgingsStore: NgLodgingsStore... | dovanduy/skysmack-web | libs/ng-packages/ng-lodgings-doorways/src/lib/lodgings-doorways/redux/ng-lodgings-doorways-epics.ts | TypeScript |
ArrowFunction |
async () => {
await this.modelToViewModel(model, viewModel, bindingContext);
this.eventManager.dispatchEvent("onContentUpdate", model.key.replace("files/", "popups/"));
} | rproserpio/paperbits-core | src/popup/ko/popupViewModelBinder.ts | TypeScript |
ClassDeclaration |
export class PopupViewModelBinder implements ViewModelBinder<PopupModel, PopupViewModel> {
constructor(
private readonly viewModelBinderSelector: ViewModelBinderSelector,
private readonly eventManager: EventManager,
private readonly styleCompiler: StyleCompiler
) { }
public async m... | rproserpio/paperbits-core | src/popup/ko/popupViewModelBinder.ts | TypeScript |
MethodDeclaration |
public async modelToViewModel(model: PopupModel, viewModel?: PopupViewModel, bindingContext?: Bag<any>): Promise<PopupViewModel> {
if (!viewModel) {
viewModel = new PopupViewModel();
}
const widgetViewModels = [];
for (const widgetModel of model.widgets) {
cons... | rproserpio/paperbits-core | src/popup/ko/popupViewModelBinder.ts | TypeScript |
MethodDeclaration |
public canHandleModel(model: PopupModel): boolean {
return model instanceof PopupModel;
} | rproserpio/paperbits-core | src/popup/ko/popupViewModelBinder.ts | TypeScript |
FunctionDeclaration | // Type definitions for dogapi 2.8
// Project: https://github.com/brettlangdon/node-dogapi#readme
// Definitions by: olebedev <https://github.com/olebedev>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.2
export function initialize(opts: { api_key: string; app_key: string; a... | 0-Captain/DefinitelyTyped | types/dogapi/index.d.ts | TypeScript |
InterfaceDeclaration |
interface event {
create(title: string, text: string, callback: (err: Error | null, res: EventCreateResponse) => void): void;
create(
title: string,
text: string,
properties: {
date_happened?: number | undefined;
priority?: 'normal' | 'low' | undefined;
... | 0-Captain/DefinitelyTyped | types/dogapi/index.d.ts | TypeScript |
InterfaceDeclaration |
interface metric {
send(metric: string, points: number | number[], callback: (err: Error | null, res: 'ok') => void): void;
send(
metric: string,
points: number | number[],
extra: {
type?: 'gauge' | 'rate' | 'count' | undefined;
metric_type?: 'gauge' | 'count' | ... | 0-Captain/DefinitelyTyped | types/dogapi/index.d.ts | TypeScript |
InterfaceDeclaration |
export interface EventCreateResponse {
ok: boolean;
event: {
date_happened: number;
handle: any;
id: bigint;
priority: 'normal' | 'low';
related_event_id: number | null;
tags: ReadonlyArray<string>;
text: string;
title: string;
url: string... | 0-Captain/DefinitelyTyped | types/dogapi/index.d.ts | TypeScript |
FunctionDeclaration | /**
* Flattens an array.
* Use this function to keep support for node 10
* @param array
*/
declare function arrayFlat<T>(array: T[][]): T[]; | Bryan-Guner-Backup/Bryan-Guner-Backup | node_modules/web-component-analyzer/lib/cjs/array-util-aa2883ec.d.ts | TypeScript |
FunctionDeclaration | /**
* Filters an array returning only defined items
* @param array
*/
declare function arrayDefined<T>(array: (T | undefined)[]): T[]; | Bryan-Guner-Backup/Bryan-Guner-Backup | node_modules/web-component-analyzer/lib/cjs/array-util-aa2883ec.d.ts | TypeScript |
FunctionDeclaration |
function getId(manifest: IExtensionManifest, withVersion?: boolean): string {
if (withVersion) {
return `${manifest.publisher}.${manifest.name}@${manifest.version}`;
} else {
return `${manifest.publisher}.${manifest.name}`;
}
} | jepetty/vscode | src/vs/code/node/cliProcessMain.ts | TypeScript |
FunctionDeclaration |
export function getIdAndVersion(id: string): [string, string | undefined] {
const matches = EXTENSION_ID_REGEX.exec(id);
if (matches && matches[1]) {
return [adoptToGalleryExtensionId(matches[1]), matches[2]];
}
return [adoptToGalleryExtensionId(id), undefined];
} | jepetty/vscode | src/vs/code/node/cliProcessMain.ts | TypeScript |
FunctionDeclaration |
async function getExtensionId(extensionDescription: string): Promise<string> {
if (!/\.vsix$/i.test(extensionDescription)) {
return extensionDescription;
}
const zipPath = path.isAbsolute(extensionDescription) ? extensionDescription : path.join(process.cwd(), extensionDescription);
const manifest = aw... | jepetty/vscode | src/vs/code/node/cliProcessMain.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.