type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(newTimezone: string) => {
setUsernameResetToken(v4());
setEmailResetToken(v4());
return updateProfile({ timezone: newTimezone });
} | Jskobos/manager | packages/manager/src/features/Profile/DisplaySettings/DisplaySettings.tsx | TypeScript |
ArrowFunction |
thisNotification => thisNotification.type === 'user_email_bounce' | Jskobos/manager | packages/manager/src/features/Profile/DisplaySettings/DisplaySettings.tsx | TypeScript |
ArrowFunction |
(theme: GrafanaTheme2) => {
return {
menu: css`
label: grafana-select-menu;
background: ${theme.components.dropdown.background};
box-shadow: ${theme.shadows.z3};
position: relative;
min-width: 100%;
z-index: 1;
`,
option: css`
label: grafana-select-option;
... | logzio/grafana | packages/grafana-ui/src/components/Select/getSelectStyles.ts | TypeScript |
InterfaceDeclaration |
export interface CreateMessageRequest {
messageId?: string | undefined;
/**
* is_system_message can only be true if the user is an administrator,
* or turms server will return an error
*/
isSystemMessage?: boolean | undefined;
groupId?: string | undefined;
recipientId?: string | undefined;
deliver... | IDiDidiDiDidi/turms | turms-client-js/src/model/proto/request/message/create_message_request.ts | TypeScript |
MethodDeclaration |
encode(
message: CreateMessageRequest,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.messageId !== undefined) {
writer.uint32(8).int64(message.messageId);
}
if (message.isSystemMessage !== undefined) {
writer.uint32(16).bool(message.isSystemMessage);
}
i... | IDiDidiDiDidi/turms | turms-client-js/src/model/proto/request/message/create_message_request.ts | TypeScript |
MethodDeclaration |
decode(
input: _m0.Reader | Uint8Array,
length?: number
): CreateMessageRequest {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseCreateMessageRequest } as CreateMessageRequest;... | IDiDidiDiDidi/turms | turms-client-js/src/model/proto/request/message/create_message_request.ts | TypeScript |
FunctionDeclaration |
function getWebViewContent(context: vscode.ExtensionContext, localizeHTML){
const htmlOnDiskPath = vscode.Uri.file(path.join(context.extensionPath, 'src', 'launcher', 'tdsReplay', 'tdsReplayLauncherConfig.html'));
const cssOniskPath = vscode.Uri.file(path.join(context.extensionPath, 'resources', 'css', 'form.css'))... | WesleyDesenvolvedorWebMobile/tds-vscode | src/launcher/tdsReplay/tdsReplayLauncherConfig.ts | TypeScript |
FunctionDeclaration |
function updateElement(element: any, message: any) {
element.tdsReplayFile = message.tdsReplayFile;
element.password = message.password;
element.includeSources = message.includeSources;
element.excludeSources = message.excludeSources;
element.ignoreSourcesNotFound = message.ignoreSourcesNotFound;
} | WesleyDesenvolvedorWebMobile/tds-vscode | src/launcher/tdsReplay/tdsReplayLauncherConfig.ts | TypeScript |
FunctionDeclaration |
function saveNewLauncher(message: any, launchersInfo: any): void {
let element: any = {
type: "totvs_tdsreplay_debug",
request: "launch",
cwb: "${workspaceRoot}",
ignoreSourcesNotFound: true,
name: message.launcherName
};
updateElement(element, message);
launchersInfo.configurations.push(element);
} | WesleyDesenvolvedorWebMobile/tds-vscode | src/launcher/tdsReplay/tdsReplayLauncherConfig.ts | TypeScript |
FunctionDeclaration |
function addLaunchJsonListener(): void {
let launchJson = Utils.getLaunchConfigFile();
if (!fs.existsSync(launchJson)) {
Utils.createLaunchConfig();
}
if (fs.existsSync(launchJson)) {
fs.watch(launchJson, { encoding: 'buffer' }, (eventType, filename) => {
if (filename && eventType === 'change') {
let ... | WesleyDesenvolvedorWebMobile/tds-vscode | src/launcher/tdsReplay/tdsReplayLauncherConfig.ts | TypeScript |
ArrowFunction |
() => {
currentPanel = undefined;
} | WesleyDesenvolvedorWebMobile/tds-vscode | src/launcher/tdsReplay/tdsReplayLauncherConfig.ts | TypeScript |
ArrowFunction |
(event) => {
if(currentPanel !== undefined && currentPanel.visible) {
if(launcherInfoChangedManually) {
launcherInfoChangedManually = false;
currentPanel.webview.postMessage(Utils.getLaunchConfig());
}
}
} | WesleyDesenvolvedorWebMobile/tds-vscode | src/launcher/tdsReplay/tdsReplayLauncherConfig.ts | TypeScript |
ArrowFunction |
message => {
switch (message.command) {
case 'saveLaunchConfig':
const launcherName = message.launcherName;
if(launchersInfo.configurations !== undefined) {
if(launchersInfo.configurations.length > 0 !== undefined) {
let updated: boolean = false;
for(let i=0 ; i < launchers... | WesleyDesenvolvedorWebMobile/tds-vscode | src/launcher/tdsReplay/tdsReplayLauncherConfig.ts | TypeScript |
ArrowFunction |
(eventType, filename) => {
if (filename && eventType === 'change') {
let tmpLaunchIfo = Utils.getLaunchConfigFile();
let tmpContent = fs.readFileSync(tmpLaunchIfo, 'utf-8');
if(currentLaunchersInfoContent !== tmpContent) {
currentLaunchersInfoContent = tmpContent;
//Nao é possivel pedir para a... | WesleyDesenvolvedorWebMobile/tds-vscode | src/launcher/tdsReplay/tdsReplayLauncherConfig.ts | TypeScript |
ClassDeclaration |
export default class LauncherConfiguration {
static show(context: vscode.ExtensionContext) {
if (currentPanel) {
currentPanel.reveal();
} else {
addLaunchJsonListener();
currentPanel = vscode.window.createWebviewPanel(
'totvs-developer-studio.tdsreplay.configure.launcher',
localize("tds.vscode.... | WesleyDesenvolvedorWebMobile/tds-vscode | src/launcher/tdsReplay/tdsReplayLauncherConfig.ts | TypeScript |
MethodDeclaration |
static show(context: vscode.ExtensionContext) {
if (currentPanel) {
currentPanel.reveal();
} else {
addLaunchJsonListener();
currentPanel = vscode.window.createWebviewPanel(
'totvs-developer-studio.tdsreplay.configure.launcher',
localize("tds.vscode.tdsreplay.launcher.configuration",'TDS Replay ... | WesleyDesenvolvedorWebMobile/tds-vscode | src/launcher/tdsReplay/tdsReplayLauncherConfig.ts | TypeScript |
ArrowFunction |
( ) => lyl `{
display: inline-block
position: relative
line-height: 1.125
${classes.hint}, ${classes.error} {
display: block
}
${classes.label}, ${classes.placeholder} {
ly-icon {
font-size: inherit
}
}
${classes.prefix}, ${classes.suffi... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
fn => fn(classes) | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
( ) => lyl `{
& ${classes.labelSpan} {
transition: ${theme.animations.curves.deceleration} .${theme.animations.durations.complex}s
}
& ${classes.label} {
transition: ${theme.animations.curves.deceleration} .${theme.animations.durations.complex}s
}
}` | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
() => lyl `{
&:not(${classes.errorState}) ${classes.fieldRequiredMarker} {
color: ${theme.accent.default}
}
}` | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
( ) => lyl `{
&, & ${classes.label}, & ${classes.container}:after {
color: ${theme.disabled.contrast}
cursor: default
}
}` | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
( ) => lyl `{
& ${classes.label}, & ${classes.hintContainer}, &${classes.selectArrow} ${classes.infix}:after {
color: ${theme.warn.default}!important
}
& ${classes.fieldset}, & ${classes.container}:after {
border-color: ${theme.warn.default}!important
}
& ${classes.inputNa... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
( ) => lyl `{
${classes.infix} {
&::after {
position: absolute
content: ''
width: 0
height: 0
border-left: 0.3125em solid transparent
border-right: 0.3125em solid transparent
border-top: 0.3125em solid
top: 0
${afte... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
(val, media) => ({ breakpoints }: ThemeVariables, ref) => {
const classes = ref.selectorsOf(STYLES);
return lyl `{
@media ${(media && breakpoints[media]) || 'all'} {
${classes.floatingLabel} ${classes.labelSpan} {
transform: scale(${val})
width: ${Math.round(100 / ... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
({ breakpoints }: ThemeVariables, ref) => {
const classes = ref.selectorsOf(STYLES);
return lyl `{
@media ${(media && breakpoints[media]) || 'all'} {
${classes.floatingLabel} ${classes.labelSpan} {
transform: scale(${val})
width: ${Math.round(100 / 0.75)}%
... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
val => (theme: ThemeVariables, ref) => {
const classes = ref.selectorsOf(STYLES);
const color = theme.colorOf(val);
const contrast = theme.colorOf(`${val}:contrast`);
return lyl `{
&${classes.focused} ${classes.container}:after,
&${classes.focused}${classes.selectArrow} ${classe... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
(theme: ThemeVariables, ref) => {
const classes = ref.selectorsOf(STYLES);
const color = theme.colorOf(val);
const contrast = theme.colorOf(`${val}:contrast`);
return lyl `{
&${classes.focused} ${classes.container}:after,
&${classes.focused}${classes.selectArrow} ${classes.infix... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
val => (theme: LyFieldVariables, ref) => {
const classes = ref.selectorsOf(STYLES);
if (theme.field?.appearance) {
const appearance = theme.field.appearance[val];
if (appearance) {
return appearance instanceof StyleCollection
? appearance.setTransformer((_) => _(classe... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
(theme: LyFieldVariables, ref) => {
const classes = ref.selectorsOf(STYLES);
if (theme.field?.appearance) {
const appearance = theme.field.appearance[val];
if (appearance) {
return appearance instanceof StyleCollection
? appearance.setTransformer((_) => _(classes)).css... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
(_) => _(classes) | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
() => {
this._updateFloatingLabel();
this._updateDisplayWith();
this._markForCheck();
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
() => {
this._updateFloatingLabel();
this._updateDisplayWith();
this._markForCheck();
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
() => {
this._ngZone.onStable.pipe(takeUntil(this._destroyed)).subscribe(() => {
if (this._updateFielsetSpanOnStable) {
this._updateFielsetSpan();
}
});
this._ngZone.onStable.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {
this._updateDisplayWith();
... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
() => {
if (this._updateFielsetSpanOnStable) {
this._updateFielsetSpan();
}
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
() => {
this._updateDisplayWith();
this._renderer.addClass(this._el.nativeElement, this.classes.animations);
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
() => {
this._updateFielsetSpanOnStable = true;
this._markForCheck();
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
type => type === nativeElement.type | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ArrowFunction |
() => {
this.disabled = !!ngControl.disabled;
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ClassDeclaration |
@Directive({
selector:
'input[lyInput], textarea[lyInput], input[lyNativeControl], textarea[lyNativeControl], select[lyNativeControl]',
exportAs: 'LyNativeControl',
providers: [
StyleRenderer,
{ provide: LyFieldControlBase, useExisting: LyNativeControl }
]
})
export class LyNativeControl implemen... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
InterfaceDeclaration |
export interface LyFieldTheme {
/** Styles for Field Component */
root?: StyleCollection<((classes: LyClasses<typeof STYLES>) => StyleTemplate)>
| ((classes: LyClasses<typeof STYLES>) => StyleTemplate);
appearance?: {
standard?: StyleCollection<((classes: LyClasses<typeof STYLES>) => StyleTemplate)>
... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
InterfaceDeclaration |
export interface LyFieldVariables {
field?: LyFieldTheme;
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
InterfaceDeclaration |
export interface LyFieldDefaultOptions {
appearance?: string;
/**
* Whether the label is floating.
* false (default): The label will only float when needed
* true: The label will always be floating
*/
floatingLabel?: boolean;
/**
* Whether the hint will always show.
* false (default): The hin... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
@HostListener('focus') onFocus() {
this._el.nativeElement.focus();
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
if (!this.color) {
this.color = DEFAULT_WITH_COLOR;
}
if (this.floatingLabelSize == null) {
this.floatingLabelSize = (this._defaults?.floatingLabelSize != null)
? this._defaults?.floatingLabelSize
: DEFAULT_FLOATING_LABEL_SIZE;
}
if (!this.appearance) {
... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
ngAfterContentInit() {
this._control!.stateChanges.subscribe(() => {
this._updateFloatingLabel();
this._updateDisplayWith();
this._markForCheck();
});
const ngControl = this._control!.ngControl;
// Run change detection if the value changes.
if (ngControl && ngControl.valueChange... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
ngAfterViewInit() {
this._updateFielsetSpan();
this._updateFloatingLabel();
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
ngOnDestroy() {
this._destroyed.next();
this._destroyed.complete();
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
_updateFielsetSpan() {
if (!this._platform.isBrowser) {
return;
}
if (this.floatingLabelSize == null) {
return;
}
if (this.appearance !== 'outlined') {
return;
}
const label = this._isLabel() ? this._labelSpan.nativeElement : null;
const labelChildren = this._isLabe... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration | /** @ignore */
_isLabel() {
if (this._control && this._control.placeholder && !this._labelChild) {
return true;
} else if (this._labelChild || this._placeholderChild) {
return true;
}
return false;
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration | /** @ignore */
_isPlaceholder() {
if ((this._labelChild && this._control && this._control.placeholder) || (this._labelChild && this._placeholderChild)) {
return true;
}
return false;
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration | /** @ignore */
_isEmpty() {
const val = this._control ? this._control.value : null;
return val === '' || val === null || val === undefined;
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
private _updateFloatingLabel() {
if (this._labelContainer2) {
const isFloating = this._control!.floatingLabel || this.floatingLabel;
if (this._isFloating !== isFloating) {
this._isFloating = isFloating;
if (isFloating) {
this._renderer.addClass(this._labelContainer2.nativeElem... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
private _updateDisplayWith() {
if (this._control) {
this._control.sRenderer.toggleClass(this.classes._hiddenInput, this.displayWithStatus);
}
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
private _markForCheck() {
this._cd.markForCheck();
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
_getHostElement() {
return this._el.nativeElement;
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
@HostListener('input') _onInput() {
this.stateChanges.next();
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
@HostListener('blur') _onBlur() {
if (this._focused !== false) {
this._focused = false;
this.stateChanges.next();
}
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
@HostListener('focus') _onFocus() {
if (this._focused !== true) {
this._focused = true;
this.stateChanges.next();
}
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this._renderer.setAttribute(this._getHostElement(), 'placeholder', '');
const { nativeElement } = this._el;
if (nativeElement.nodeName.toLowerCase() === 'select') {
this._isSelectInput = true;
}
// apply class {selectArrow} to `<select> not multiple`
if (this._field && na... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
ngDoCheck() {
if (this._field._control) {
const oldVal = this.errorState;
const newVal = !!(this.ngControl && this.ngControl.invalid && (this.ngControl.touched || (this._form && this._form.submitted)));
if (newVal !== oldVal) {
this.errorState = newVal;
if (this._field) {
... | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
ngOnDestroy() {
this.stateChanges.complete();
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration | /** @docs-private */
onContainerClick(_e: MouseEvent) {
this._getHostElement().focus();
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration | /** Focuses the input. */
focus(): void { this._getHostElement().focus(); } | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
MethodDeclaration |
private _hasLabelSelectionOption() {
const el = this._getHostElement() as HTMLSelectElement;
const option = el.selectedOptions ? el.selectedOptions.item(0) : null;
return option ? !!option.label : false;
} | A-l-y-l-e/Alyle-UI | src/lib/field/field.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-mtk-chart-card-item2',
templateUrl: './chart-card-item2.component.html',
styleUrls: ['./chart-card-item2.component.scss']
})
export class ChartCardItem2Component implements OnInit {
constructor(public chartData1: ChartCardData2Service) { }
ngOnInit() {
}
} | re-architecture/nebula.webapp-angular | src/app/mtk/components/chart-card-item2/chart-card-item2.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
} | re-architecture/nebula.webapp-angular | src/app/mtk/components/chart-card-item2/chart-card-item2.component.ts | TypeScript |
ArrowFunction |
value => {
if (!value.creditCardID) return;
const type = getCreditCardType(value.creditCardID);
if (type === 'Visa') {
this.isVisa = true;
this.isAmericanExpress = false;
this.isMaster = false;
this.isDiscover = false;
} else if (type === 'Discove... | JayKan/digital-wallet | src/app/components/wallet-add.ts | TypeScript |
ArrowFunction |
card => {
this.success.emit(card);
} | JayKan/digital-wallet | src/app/components/wallet-add.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'wallet-add',
encapsulation: ViewEncapsulation.None,
template:`
<section class="row">
<header class="add-wallet">
<h2 class="center">
<i class="fa fa-angle-left add-icon" aria-hidden="true" (click)="navigateTo('wallet')"></i>
Add debit or credit card
... | JayKan/digital-wallet | src/app/components/wallet-add.ts | TypeScript |
MethodDeclaration |
ngOnInit(): void {
this.form = this.formBuilder.group({
firstName: ['',[
Validators.required,
Validators.pattern(stringRegex),
Validators.maxLength(24),
]],
lastName: ['', [
Validators.required,
Validators.pattern(stringRegex),
Validators.maxLength(... | JayKan/digital-wallet | src/app/components/wallet-add.ts | TypeScript |
MethodDeclaration |
navigateTo(nextState: string): void {
this.wallet.changeCurrentSelectedState(nextState);
} | JayKan/digital-wallet | src/app/components/wallet-add.ts | TypeScript |
MethodDeclaration |
submit(): void {
const type = getCreditCardType(this.form.value.creditCardID);
this.form.patchValue({ type });
this.wallet.createCard(this.form.value).subscribe(card => {
this.success.emit(card);
});
} | JayKan/digital-wallet | src/app/components/wallet-add.ts | TypeScript |
FunctionDeclaration |
function ListItem (props: ListItemProps) {
const [cardRef] = useScrollIntoView(props.shouldScrollIntoView)
const onClick = useReadArticleClickHandler(props.onReadFeedItem, {
item: props.item
})
const data = props.item.article?.data
if (!data) {
return null
}
return (
<Card.ListItem>
<a ... | AnudeepGunukula/brave-core | components/brave_new_tab_ui/components/default/braveToday/cards/categoryGroup/index.tsx | TypeScript |
FunctionDeclaration |
export default function CategoryGroup (props: Props) {
// No content no render®
if (props.content.length < 3 || props.content.some(c => !c.article)) {
return null
}
return (
<Card.BrandedList>
<Card.Title>{props.categoryName}</Card.Title>
<Card.List>
{
props.content.map((i... | AnudeepGunukula/brave-core | components/brave_new_tab_ui/components/default/braveToday/cards/categoryGroup/index.tsx | TypeScript |
ArrowFunction |
c => !c.article | AnudeepGunukula/brave-core | components/brave_new_tab_ui/components/default/braveToday/cards/categoryGroup/index.tsx | TypeScript |
ArrowFunction |
(item, index) => {
const data = item.article?.data
// we already validated this, but typescript wants
// us to do it again
if (!data) {
return <React.Fragment key={index} />
}
const shouldScrollTo = (
!!props.articleToS... | AnudeepGunukula/brave-core | components/brave_new_tab_ui/components/default/braveToday/cards/categoryGroup/index.tsx | TypeScript |
InterfaceDeclaration |
interface Props {
content: BraveNews.FeedItem[]
publishers: BraveNews.Publishers
categoryName: string
articleToScrollTo?: BraveNews.FeedItemMetadata
onReadFeedItem: OnReadFeedItem
} | AnudeepGunukula/brave-core | components/brave_new_tab_ui/components/default/braveToday/cards/categoryGroup/index.tsx | TypeScript |
TypeAliasDeclaration |
type ListItemProps = {
item: BraveNews.FeedItem
publisher?: BraveNews.Publisher
onReadFeedItem: OnReadFeedItem
shouldScrollIntoView: boolean
} | AnudeepGunukula/brave-core | components/brave_new_tab_ui/components/default/braveToday/cards/categoryGroup/index.tsx | TypeScript |
ClassDeclaration |
export class InterfaceDeclarationCompiler extends NodeCompiler<ts.InterfaceDeclaration> {
public readonly kind = ts.SyntaxKind.InterfaceDeclaration;
public visitNode(_sb: ScriptBuilder, _node: ts.InterfaceDeclaration, _optionsIn: VisitOptions): void {
// do nothing
}
} | DanPopa46/neo-one | packages/neo-one-smart-contract-compiler/src/compile/declaration/InterfaceDeclarationCompiler.ts | TypeScript |
MethodDeclaration |
public visitNode(_sb: ScriptBuilder, _node: ts.InterfaceDeclaration, _optionsIn: VisitOptions): void {
// do nothing
} | DanPopa46/neo-one | packages/neo-one-smart-contract-compiler/src/compile/declaration/InterfaceDeclarationCompiler.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-language-modal',
templateUrl: './languageModal.component.html',
styleUrls: ['./languageModal.component.scss'],
})
export class LanguageModalComponent implements OnInit {
constructor(public modalController: ModalController) {
}
async presentModal() {
const modal = await t... | maestrotype/LLE | src/app/components/languageModal/languageModal.component.ts | TypeScript |
MethodDeclaration |
async presentModal() {
const modal = await this.modalController.create({
swipeToClose: true,
component: LanguageModal,
});
return await modal.present();
} | maestrotype/LLE | src/app/components/languageModal/languageModal.component.ts | TypeScript |
ArrowFunction |
() => import('./admin/admin-routing.module').then(m => m.AdminRoutingModule) | alvieira/jhipster-course | jblog/src/main/webapp/app/app-routing.module.ts | TypeScript |
ArrowFunction |
m => m.AdminRoutingModule | alvieira/jhipster-course | jblog/src/main/webapp/app/app-routing.module.ts | TypeScript |
ArrowFunction |
() => import('./account/account.module').then(m => m.AccountModule) | alvieira/jhipster-course | jblog/src/main/webapp/app/app-routing.module.ts | TypeScript |
ArrowFunction |
m => m.AccountModule | alvieira/jhipster-course | jblog/src/main/webapp/app/app-routing.module.ts | TypeScript |
ClassDeclaration |
@NgModule({
imports: [
RouterModule.forRoot(
[
{
path: 'admin',
data: {
authorities: [Authority.ADMIN],
},
canActivate: [UserRouteAccessService],
loadChildren: () => import('./admin/admin-routing.module').then(m => m.AdminRoutingModule),... | alvieira/jhipster-course | jblog/src/main/webapp/app/app-routing.module.ts | TypeScript |
FunctionDeclaration |
export declare function deleteFile(endpoint: string, hdNode: HDKey, fileID: string): Promise<import("axios").AxiosResponse<any>>; | opacity/opacity-electron-typescript | opaque/pkg/dist-types/core/requests/deleteFile.d.ts | TypeScript |
InterfaceDeclaration |
export interface CourseSertificate {
cvId: string;
courseName: string;
certificateUrl: string;
} | IvayloNikolov36/JobFinder-Front-end | JobFinder/src/app/core/models/cv/course-sertificate.ts | TypeScript |
InterfaceDeclaration | // https://eips.ethereum.org/EIPS/eip-3085
export interface AddEthereumChainParameter {
chainId: string
blockExplorerUrls?: string[]
chainName?: string
iconUrls?: string[]
nativeCurrency?: Currency
rpcUrls?: any
} | CatharsisNetwork/catharsis-interface | src/network/data/AddEthereumChainParameter.d.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'po-progress-bar',
templateUrl: './po-progress-bar.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PoProgressBarComponent {
@Input('p-indeterminate') indeterminate: boolean;
@Input('p-value') value: number;
get valueScale() {
return `${this.va... | nicoleoliveira/portinari-angular-wai-aria | projects/ui/src/lib/components/po-progress/po-progress-bar/po-progress-bar.component.ts | TypeScript |
FunctionDeclaration | /**
* Tries to discover all possible plugins based on the provided plugin config.
* Discovery result consists of two separate streams, the one (`plugin$`) is
* for the successfully discovered plugins and the other one (`error$`) is for
* all the errors that occurred during discovery process.
*
* @param config Plu... | ChanghunKang/kibana | src/core/server/plugins/discovery/plugins_discovery.ts | TypeScript |
FunctionDeclaration | /**
* Iterates over every plugin search path and returns a merged stream of all
* sub-directories. If directory cannot be read or it's impossible to get stat
* for any of the nested entries then error is added into the stream instead.
* @param pluginDirs List of the top-level directories to process.
* @param log P... | ChanghunKang/kibana | src/core/server/plugins/discovery/plugins_discovery.ts | TypeScript |
FunctionDeclaration | /**
* Tries to load and parse the plugin manifest file located at the provided plugin
* directory path and produces an error result if it fails to do so or plugin manifest
* isn't valid.
* @param path Path to the plugin directory where manifest should be loaded from.
* @param log Plugin discovery logger instance.
... | ChanghunKang/kibana | src/core/server/plugins/discovery/plugins_discovery.ts | TypeScript |
ArrowFunction |
pluginPathOrError => {
return typeof pluginPathOrError === 'string'
? createPlugin$(pluginPathOrError, log, coreContext)
: [pluginPathOrError];
} | ChanghunKang/kibana | src/core/server/plugins/discovery/plugins_discovery.ts | TypeScript |
ArrowFunction |
(entry): entry is PluginWrapper => entry instanceof PluginWrapper | ChanghunKang/kibana | src/core/server/plugins/discovery/plugins_discovery.ts | TypeScript |
ArrowFunction |
(entry): entry is PluginDiscoveryError => !(entry instanceof PluginWrapper) | ChanghunKang/kibana | src/core/server/plugins/discovery/plugins_discovery.ts | TypeScript |
ArrowFunction |
dir => {
log.debug(`Scanning "${dir}" for plugin sub-directories...`);
return fsReadDir$(dir).pipe(
mergeMap((subDirs: string[]) => subDirs.map(subDir => resolve(dir, subDir))),
mergeMap(path =>
fsStat$(path).pipe(
// Filter out non-directory entries from target direc... | ChanghunKang/kibana | src/core/server/plugins/discovery/plugins_discovery.ts | TypeScript |
ArrowFunction |
(subDirs: string[]) => subDirs.map(subDir => resolve(dir, subDir)) | ChanghunKang/kibana | src/core/server/plugins/discovery/plugins_discovery.ts | TypeScript |
ArrowFunction |
subDir => resolve(dir, subDir) | ChanghunKang/kibana | src/core/server/plugins/discovery/plugins_discovery.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.