type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
onSourceCtrlEnter(event: KeyboardEvent) {
super.onSourceCtrlEnter(event);
this.getIFrame().subscribe(iframe => {
iframe.nativeElement.src = this._value.content;
});
} | jrpereirajr/iris-analytics-notebook | frontend/src/app/notebook/cell/nb-cell-iris-analytics/nb-cell-iris-analytics.component.ts | TypeScript |
ArrowFunction |
params => {
this.scenarioId = params.get('id');
this.characters = this.scenarioService.getScenarioCharacters(this.scenarioId);
} | courtneypattison/attack-modifier-deck | src/app/scenario/scenario-active/scenario-active.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'amd-scenario-active',
templateUrl: './scenario-active.component.html',
})
export class ScenarioActiveComponent implements OnInit {
characters: Promise<Character[]>;
scenarioId: string;
constructor(private route: ActivatedRoute, private scenarioService: ScenarioService) { }
async n... | courtneypattison/attack-modifier-deck | src/app/scenario/scenario-active/scenario-active.component.ts | TypeScript |
MethodDeclaration |
async ngOnInit() {
this.route.paramMap.pipe(take(1)).subscribe(params => {
this.scenarioId = params.get('id');
this.characters = this.scenarioService.getScenarioCharacters(this.scenarioId);
}
);
} | courtneypattison/attack-modifier-deck | src/app/scenario/scenario-active/scenario-active.component.ts | TypeScript |
ArrowFunction |
(props: AntdIconProps, context: SetupContext) => {
const p = { ...props, ...context.attrs };
return <AntdIcon {...p} icon={FridgeLineSvg}></AntdIcon>;
} | DivXPro/airclass-icons | packages/icons-vue/src/icons/FridgeLine.tsx | TypeScript |
ArrowFunction |
(resolve, reject) => {
this._image = new Image();
this._image.className = "f-none w-100";
this._image.onload = () => {
resolve();
};
this._image.src = this._src;
} | phobon/phobon-io | src/backer/backer.ts | TypeScript |
ArrowFunction |
() => {
resolve();
} | phobon/phobon-io | src/backer/backer.ts | TypeScript |
ClassDeclaration |
export class Backer implements IBacker {
private _site: HTMLElement;
private _src: string;
private _image: HTMLImageElement;
constructor(site: HTMLElement, src: string) {
this._site = site;
this._src = src;
}
get site(): HTMLElement {
return this._site;
}
get... | phobon/phobon-io | src/backer/backer.ts | TypeScript |
MethodDeclaration |
enter(): Promise<void> {
return Promise.resolve();
} | phobon/phobon-io | src/backer/backer.ts | TypeScript |
MethodDeclaration |
exit(): Promise<void> {
return Promise.resolve();
} | phobon/phobon-io | src/backer/backer.ts | TypeScript |
MethodDeclaration |
loadAssets(): Promise<void> {
var p: Promise<void> = new Promise<void>((resolve, reject) => {
this._image = new Image();
this._image.className = "f-none w-100";
this._image.onload = () => {
resolve();
};
this._image.... | phobon/phobon-io | src/backer/backer.ts | TypeScript |
ArrowFunction |
(Client: any, config: any, components: any) => {
const ca = components.clientAction.factory;
Client.prototype.slm = components.clientAction.namespaceFactory();
const slm = Client.prototype.slm.prototype;
slm.policies = ca({
urls: [
{
fmt: '/_slm/policy',
},
],
method: 'GET',
... | GardenPatch/kibana | x-pack/legacy/plugins/snapshot_restore/server/client/elasticsearch_slm.ts | TypeScript |
ClassDeclaration | /**
* Clean HTML after removeFormat and insertHorizontalRule command
*/
export declare class cleanHtml extends Plugin {
/** @override */
buttons: Plugin['buttons'];
/** @override */
protected afterInit(jodit: IJodit): void;
/**
* Replaces an element with a newer one if specified in the config... | doanminhduc97/siem | node_modules/jodit/types/plugins/fix/clean-html.d.ts | TypeScript |
InterfaceDeclaration |
interface Config {
cleanHTML: {
timeout: number;
/**
* Replace &nbsp; toWYSIWYG plain space
*/
replaceNBSP: boolean;
fillEmptyParagraph: boolean;
removeEmptyElements: boolean;
replaceOldTags: IDictionary<HTMLT... | doanminhduc97/siem | node_modules/jodit/types/plugins/fix/clean-html.d.ts | TypeScript |
MethodDeclaration | /** @override */
protected afterInit(jodit: IJodit): void; | doanminhduc97/siem | node_modules/jodit/types/plugins/fix/clean-html.d.ts | TypeScript |
MethodDeclaration | /**
* Event handler when manually assigning a value to the HTML editor.
*/
protected onBeforeSetNativeEditorValue(data: {
value: string;
}): boolean; | doanminhduc97/siem | node_modules/jodit/types/plugins/fix/clean-html.d.ts | TypeScript |
MethodDeclaration |
protected onSafeHTML(sandBox: HTMLElement): void; | doanminhduc97/siem | node_modules/jodit/types/plugins/fix/clean-html.d.ts | TypeScript |
MethodDeclaration | /** @override */
protected beforeDestruct(): void; | doanminhduc97/siem | node_modules/jodit/types/plugins/fix/clean-html.d.ts | TypeScript |
ClassDeclaration |
export class AuthedResponseSpec extends Spec {
override createExam(report: Report, name: string, options: TestOptions): WarpExam {
return new WarpExam(report, this, name, options);
}
@Test
parseAuthed(exam: WarpExam): void {
exam.parses("@authed", AuthedResponse.create());
}
@Test
parseAuthedWi... | asad-awadia/swim | swim-system-js/swim-mesh-js/@swim/warp/test/AuthedResponseSpec.ts | TypeScript |
MethodDeclaration |
override createExam(report: Report, name: string, options: TestOptions): WarpExam {
return new WarpExam(report, this, name, options);
} | asad-awadia/swim | swim-system-js/swim-mesh-js/@swim/warp/test/AuthedResponseSpec.ts | TypeScript |
MethodDeclaration |
@Test
parseAuthed(exam: WarpExam): void {
exam.parses("@authed", AuthedResponse.create());
} | asad-awadia/swim | swim-system-js/swim-mesh-js/@swim/warp/test/AuthedResponseSpec.ts | TypeScript |
MethodDeclaration |
@Test
parseAuthedWithBody(exam: WarpExam): void {
exam.parses("@authed@test", AuthedResponse.create(Record.of(Attr.of("test"))));
} | asad-awadia/swim | swim-system-js/swim-mesh-js/@swim/warp/test/AuthedResponseSpec.ts | TypeScript |
MethodDeclaration |
@Test
writeAuthed(exam: WarpExam): void {
exam.writes(AuthedResponse.create(), "@authed");
} | asad-awadia/swim | swim-system-js/swim-mesh-js/@swim/warp/test/AuthedResponseSpec.ts | TypeScript |
MethodDeclaration |
@Test
writeAuthedWithBody(exam: WarpExam): void {
exam.writes(AuthedResponse.create(Record.of(Attr.of("test"))), "@authed@test");
} | asad-awadia/swim | swim-system-js/swim-mesh-js/@swim/warp/test/AuthedResponseSpec.ts | TypeScript |
ArrowFunction |
(
config: FontSizePluginConfig,
element: Element,
children: JSX.Element
) => {
const { fontSize } = element;
if (!fontSize) {
return children;
}
return React.cloneElement(children, {
style: {
...(children && children.props && children.props.style),
fontSize:
(config.fontSizesS... | guestbell/react-page-plugins | src/lib/slate/plugins/fontSize/addFontSizeStyles.ts | TypeScript |
TypeAliasDeclaration | /**
* ObjectMap is just syntactic sugar to easily use maps in typescript without weird curly braces everywhere.
* @type ObjectMap
*/
type Map<T> = {[s:string]: T} | pgruener/data-access-layer | lib/ObjectMap.tsx | TypeScript |
TypeAliasDeclaration |
export type ObjectMap = Map<Object> | pgruener/data-access-layer | lib/ObjectMap.tsx | TypeScript |
ArrowFunction |
props => {
const { className, ...rest } = props
return (
<div className={sc('header', { extra: className })} {...rest}>
{props.children}
</div> | fernandoxu/xui | lib/layout/header.tsx | TypeScript |
InterfaceDeclaration |
interface Props extends React.HTMLAttributes<HTMLElement> {} | fernandoxu/xui | lib/layout/header.tsx | TypeScript |
MethodDeclaration |
sc('header', { extra: className }) | fernandoxu/xui | lib/layout/header.tsx | TypeScript |
ArrowFunction |
(d) => {
if (d.options.isWholeLine) {
return true;
}
const startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;
const endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;
if (startColumn > anchor.range.startColumn || anchor.range.endColumn... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
p => this._computeAsync(p, lineDecorations, anchor, token) | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
(e: IKeyboardEvent) => {
if (e.equals(KeyCode.Escape)) {
this.hide();
}
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
(e: ConfigurationChangedEvent) => {
if (e.hasChanged(EditorOption.fontInfo)) {
this._updateFont();
}
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
() => this.layout() | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
result => this._withResult(result, true) | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
result => this._withResult(result, false) | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
() => {
if (this._colorPicker) {
this.getDomNode().classList.add('colorpicker-hover');
}
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
() => {
this.getDomNode().classList.remove('colorpicker-hover');
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
() => {
this._hoverOperation.setHoverTime(this._editor.getOption(EditorOption.hover).delay);
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
() => {
if (this._isVisible && this._lastAnchor && this._messages.length > 0) {
this._hover.contentsDomNode.textContent = '';
this._renderMessages(this._lastAnchor, this._messages);
}
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
className => className.startsWith('ced-colorBox') | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
(a, b) => b.priority - a.priority | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
node => this._editor.applyFontInfo(node) | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
(m) => m.isValidForHoverAnchor(anchor) | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
() => {
// Give commands a chance to see the key
if (!this._isVisible) {
this._hoverVisibleKey.set(false);
}
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ClassDeclaration |
class EditorHoverStatusBar extends Disposable implements IEditorHoverStatusBar {
public readonly hoverElement: HTMLElement;
private readonly actionsElement: HTMLElement;
private _hasContent: boolean = false;
public get hasContent() {
return this._hasContent;
}
constructor(
@IKeybindingService private read... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ClassDeclaration |
class ModesContentComputer implements IHoverComputer<IHoverPart[]> {
private readonly _editor: ICodeEditor;
private _result: IHoverPart[];
private _anchor: HoverAnchor | null;
constructor(
editor: ICodeEditor,
private readonly _participants: readonly IEditorHoverParticipant[]
) {
this._editor = editor;
... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public addAction(actionOptions: { label: string, iconClass?: string, run: (target: HTMLElement) => void, commandId: string }): IEditorHoverAction {
const keybinding = this._keybindingService.lookupKeybinding(actionOptions.commandId);
const keybindingLabel = keybinding ? keybinding.getLabel() : null;
this._hasCon... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public append(element: HTMLElement): HTMLElement {
const result = dom.append(this.actionsElement, element);
this._hasContent = true;
return result;
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public setAnchor(anchor: HoverAnchor): void {
this._anchor = anchor;
this._result = [];
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public clearResult(): void {
this._result = [];
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
private static _getLineDecorations(editor: IActiveCodeEditor, anchor: HoverAnchor): IModelDecoration[] {
if (anchor.type !== HoverAnchorType.Range) {
return [];
}
const model = editor.getModel();
const lineNumber = anchor.range.startLineNumber;
const maxColumn = model.getLineMaxColumn(lineNumber);
retu... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public async computeAsync(token: CancellationToken): Promise<IHoverPart[]> {
const anchor = this._anchor;
if (!this._editor.hasModel() || !anchor) {
return Promise.resolve([]);
}
const lineDecorations = ModesContentComputer._getLineDecorations(this._editor, anchor);
const allResults = await Promise.all... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
private async _computeAsync(participant: IEditorHoverParticipant, lineDecorations: IModelDecoration[], anchor: HoverAnchor, token: CancellationToken): Promise<IHoverPart[]> {
if (!participant.computeAsync) {
return [];
}
return participant.computeAsync(anchor, lineDecorations, token);
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public computeSync(): IHoverPart[] {
if (!this._editor.hasModel() || !this._anchor) {
return [];
}
const lineDecorations = ModesContentComputer._getLineDecorations(this._editor, this._anchor);
let result: IHoverPart[] = [];
for (const participant of this._participants) {
result = result.concat(partic... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public onResult(result: IHoverPart[], isFromSynchronousComputation: boolean): void {
// Always put synchronous messages before asynchronous ones
if (isFromSynchronousComputation) {
this._result = result.concat(this._result);
} else {
this._result = this._result.concat(result);
}
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public getResult(): IHoverPart[] {
return this._result.slice(0);
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public getResultWithLoadingMessage(): IHoverPart[] {
if (this._anchor) {
for (const participant of this._participants) {
if (participant.createLoadingMessage) {
const loadingMessage = participant.createLoadingMessage(this._anchor);
if (loadingMessage) {
return this._result.slice(0).concat([loa... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public override dispose(): void {
this._hoverOperation.cancel();
this._editor.removeContentWidget(this);
super.dispose();
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public getId(): string {
return this._id;
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public getDomNode(): HTMLElement {
return this._hover.containerDomNode;
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
private _shouldShowAt(mouseEvent: IEditorMouseEvent): boolean {
const targetType = mouseEvent.target.type;
if (targetType === MouseTargetType.CONTENT_TEXT) {
return true;
}
if (targetType === MouseTargetType.CONTENT_EMPTY) {
const epsilon = this._editor.getOption(EditorOption.fontInfo).typicalHalfwidthC... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public maybeShowAt(mouseEvent: IEditorMouseEvent): boolean {
const anchorCandidates: HoverAnchor[] = [];
for (const participant of this._participants) {
if (typeof participant.suggestHoverAnchor === 'function') {
const anchor = participant.suggestHoverAnchor(mouseEvent);
if (anchor) {
anchorCandid... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
private _showAt(position: Position, range: Range | null, focus: boolean): void {
// Position has changed
this._showAtPosition = position;
this._showAtRange = range;
this._hoverVisibleKey.set(true);
this._isVisible = true;
this._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);
this._e... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public getPosition(): IContentWidgetPosition | null {
if (this._isVisible) {
return {
position: this._showAtPosition,
range: this._showAtRange,
preference: [
ContentWidgetPositionPreference.ABOVE,
ContentWidgetPositionPreference.BELOW
]
};
}
return null;
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
private _updateFont(): void {
const codeClasses: HTMLElement[] = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code'));
codeClasses.forEach(node => this._editor.applyFontInfo(node));
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
private _updateContents(node: Node): void {
this._hover.contentsDomNode.textContent = '';
this._hover.contentsDomNode.appendChild(node);
this._updateFont();
this._editor.layoutContentWidget(this);
this._hover.onContentsChanged();
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
private layout(): void {
const height = Math.max(this._editor.getLayoutInfo().height / 4, 250);
const { fontSize, lineHeight } = this._editor.getOption(EditorOption.fontInfo);
this._hover.contentsDomNode.style.fontSize = `${fontSize}px`;
this._hover.contentsDomNode.style.lineHeight = `${lineHeight}px`;
this... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public onModelDecorationsChanged(): void {
if (this._isChangingDecorations) {
return;
}
if (this._isVisible) {
// The decorations have changed and the hover is visible,
// we need to recompute the displayed text
this._hoverOperation.cancel();
this._computer.clearResult();
if (!this._colorPicke... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public startShowingAtRange(range: Range, mode: HoverStartMode, focus: boolean): void {
this._startShowingAt(new HoverRangeAnchor(0, range), mode, focus);
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
private _startShowingAt(anchor: HoverAnchor, mode: HoverStartMode, focus: boolean): void {
if (this._lastAnchor && this._lastAnchor.equals(anchor)) {
// We have to show the widget at the exact same range as before, so no work is needed
return;
}
this._hoverOperation.cancel();
if (this._isVisible) {
... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public hide(): void {
this._lastAnchor = null;
this._hoverOperation.cancel();
if (this._isVisible) {
setTimeout(() => {
// Give commands a chance to see the key
if (!this._isVisible) {
this._hoverVisibleKey.set(false);
}
}, 0);
this._isVisible = false;
this._hover.containerDomNode.c... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public isColorPickerVisible(): boolean {
return !!this._colorPicker;
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public setColorPicker(widget: ColorPickerWidget): void {
this._colorPicker = widget;
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
public onContentsChanged(): void {
this._hover.onContentsChanged();
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
private _withResult(result: IHoverPart[], complete: boolean): void {
this._messages = result;
if (this._lastAnchor && this._messages.length > 0) {
this._renderMessages(this._lastAnchor, this._messages);
} else if (complete) {
this.hide();
}
} | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
MethodDeclaration |
private _renderMessages(anchor: HoverAnchor, messages: IHoverPart[]): void {
if (this._renderDisposable) {
this._renderDisposable.dispose();
this._renderDisposable = null;
}
this._colorPicker = null as ColorPickerWidget | null; // TODO: TypeScript thinks this is always null
// update column from which t... | AiwarikiaR/vscode | src/vs/editor/contrib/hover/modesContentHover.ts | TypeScript |
ArrowFunction |
({ scrollDirection }) => (scrollDirection === "Up" ? "0%" : "-100%") | Banaanas/cyrilo-portfolio | Components/Header/Header.tsx | TypeScript |
ArrowFunction |
() => {
const [scrollDir, setScrollDir] = useState<ScrollDirection>("Up");
// If Scroll Down, Hide Header
useEffect(() => {
const threshold = 0;
let lastScrollY = window.pageYOffset;
let ticking = false;
const updateScrollDir = () => {
const scrollY = window.pageYOffset;
if (Math.a... | Banaanas/cyrilo-portfolio | Components/Header/Header.tsx | TypeScript |
ArrowFunction |
() => {
const threshold = 0;
let lastScrollY = window.pageYOffset;
let ticking = false;
const updateScrollDir = () => {
const scrollY = window.pageYOffset;
if (Math.abs(scrollY - lastScrollY) < threshold) {
ticking = false;
return;
}
setScrollDir(scrollY > las... | Banaanas/cyrilo-portfolio | Components/Header/Header.tsx | TypeScript |
ArrowFunction |
() => {
const scrollY = window.pageYOffset;
if (Math.abs(scrollY - lastScrollY) < threshold) {
ticking = false;
return;
}
setScrollDir(scrollY > lastScrollY ? "Down" : "Up");
lastScrollY = scrollY > 0 ? scrollY : 0;
ticking = false;
} | Banaanas/cyrilo-portfolio | Components/Header/Header.tsx | TypeScript |
ArrowFunction |
() => {
if (!ticking) {
window.requestAnimationFrame(updateScrollDir);
ticking = true;
}
} | Banaanas/cyrilo-portfolio | Components/Header/Header.tsx | TypeScript |
ArrowFunction |
() => window.removeEventListener("scroll", onScroll) | Banaanas/cyrilo-portfolio | Components/Header/Header.tsx | TypeScript |
InterfaceDeclaration |
interface HeaderProps {
scrollDirection: ScrollDirection;
} | Banaanas/cyrilo-portfolio | Components/Header/Header.tsx | TypeScript |
TypeAliasDeclaration |
type ScrollDirection = "Up" | "Down"; | Banaanas/cyrilo-portfolio | Components/Header/Header.tsx | TypeScript |
ArrowFunction |
(props: IconProps) => {
const strokeWidth = props.strokeWidth || 2
const css = styledSystem(
props.wheel.wrSystemConfig,
props.wheel.wrSystemTheme,
props.ncss
)
return (
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth={strokeWidth}
strokeLine... | jaccomeijer/wheelroom | packages/core/src/svg/feather/bluetooth.tsx | TypeScript |
InterfaceDeclaration |
interface IconProps extends SVGProps<SVGSVGElement> {
ncss: any
wheel: Wheel
strokeWidth: number
} | jaccomeijer/wheelroom | packages/core/src/svg/feather/bluetooth.tsx | TypeScript |
FunctionDeclaration |
export default function Partners() {
return (
<>
<section id="partners" className="partners">
<div className="container">
<div className="row">
<div className="col-lg-12">
<span className="title">Our Partners</span>
<div classNa... | rajeev-backtoschool/AITA | src/components/home/Partners.tsx | TypeScript |
ClassDeclaration | /**
* Mock implementation of IDeltaQueue for testing that does nothing
*/
class MockDeltaQueue<T> extends EventEmitter implements IDeltaQueue<T> {
public get disposed() { return undefined; }
public get paused(): boolean {
return false;
}
public get length(): number {
return 0;
}
... | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
ClassDeclaration | /**
* Mock implementation of IDeltaManager for testing that creates mock DeltaQueues for testing
*/
export class MockDeltaManager extends EventEmitter
implements IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> {
public get disposed() { return undefined; }
public readonly readonly = false;
... | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
MethodDeclaration |
public async pause(): Promise<void> {
return;
} | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
MethodDeclaration |
public resume(): void { } | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
MethodDeclaration |
public peek(): T | undefined {
return undefined;
} | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
MethodDeclaration |
public toArray(): T[] {
return [];
} | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
MethodDeclaration |
public async systemPause(): Promise<void> {
return;
} | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
MethodDeclaration |
public systemResume(): void {
return undefined;
} | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
MethodDeclaration |
public dispose() { } | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
MethodDeclaration |
public close(): void { } | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
MethodDeclaration |
public submitSignal(content: any): void { } | ElizabethSamuel-MSFT/FluidFramework | packages/runtime/test-runtime-utils/src/mockDeltas.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.