type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
props=>props.disabled?"not-allowed":"pointer" | Rong-Team/Rong-UI | components/Checkbox/wrapper.tsx | TypeScript |
ArrowFunction |
props=>props.theme.colors.primary | Rong-Team/Rong-UI | components/Checkbox/wrapper.tsx | TypeScript |
ArrowFunction |
props=>props.checked?checkedcss:null | Rong-Team/Rong-UI | components/Checkbox/wrapper.tsx | TypeScript |
ArrowFunction |
props=>props.disabled?css`
& + span {
color:${props.theme.colors.disabledColor};
cursor: not-allowed;
}
`:null | Rong-Team/Rong-UI | components/Checkbox/wrapper.tsx | TypeScript |
ArrowFunction |
props=>props.disabled?props.theme.colors.borderColor:props.theme.colors.primary | Rong-Team/Rong-UI | components/Checkbox/wrapper.tsx | TypeScript |
ArrowFunction |
props=>props.disabled?"not-allowed":'pointer' | Rong-Team/Rong-UI | components/Checkbox/wrapper.tsx | TypeScript |
ArrowFunction |
props=>props.checked?props.theme.colors.primary:props.disabled?props.theme.colors.disabledBackground:'#fff' | Rong-Team/Rong-UI | components/Checkbox/wrapper.tsx | TypeScript |
ArrowFunction |
props=>props.checked?props.theme.colors.primary:props.theme.colors.borderColor | Rong-Team/Rong-UI | components/Checkbox/wrapper.tsx | TypeScript |
ArrowFunction |
props => props.checked ? css`
&::after {
position: absolute;
left:2px;
opacity: 1;
transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
text-align:center;
content:'✓';
color:white;
}
`: css`
&::after {
position: abs... | Rong-Team/Rong-UI | components/Checkbox/wrapper.tsx | TypeScript |
ArrowFunction |
props=>props.disabled?"rgba(0,0,0,0.25)":props.theme.colors.primary | Rong-Team/Rong-UI | components/Checkbox/wrapper.tsx | TypeScript |
ArrowFunction |
() => {
let wrapper: ShallowWrapper<BreadcrumbProps>;
const breadcrumbList: Array<string> = ["First", "Second", "Third"];
beforeEach(() => {
wrapper = shallow(<Breadcrumb list={breadcrumbList} />);
});
it("Should render", () => {
expect(wrapper).toBeDefined();
});
it("Sho... | EldRoos/react-components | src/Breadcrumb/Breadcrumb.test.tsx | TypeScript |
ArrowFunction |
() => {
wrapper = shallow(<Breadcrumb list={breadcrumbList} />);
} | EldRoos/react-components | src/Breadcrumb/Breadcrumb.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(wrapper).toBeDefined();
} | EldRoos/react-components | src/Breadcrumb/Breadcrumb.test.tsx | TypeScript |
ArrowFunction |
() => {
const className: string = "myBreadcrumbClass";
const id: string = "myBreadcrubID";
wrapper.setProps({ className, id });
wrapper.find(".breadcrumb-item").first().simulate("click"); // Simulates scenario where there is no onClick
expect(wrapper.hasClass(className)).toBeTru... | EldRoos/react-components | src/Breadcrumb/Breadcrumb.test.tsx | TypeScript |
ArrowFunction |
() => {
const onClick: jest.Mock = jest.fn();
wrapper.setProps({ onClick });
wrapper.find(".breadcrumb-item").first().simulate("click");
expect(onClick).toBeCalled();
} | EldRoos/react-components | src/Breadcrumb/Breadcrumb.test.tsx | TypeScript |
ArrowFunction |
(
success: number,
failed: number
): string => {
if (success > 0) {
const pluralizedSuccess = success > 1 ? 'Linodes' : 'Linode';
const pluralizedFailure = failed > 1 ? 'Linodes' : 'Linode';
return `Enabled backups successfully for ${success} ${pluralizedSuccess}
, but ${failed} ${pluralizedFailu... | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(linodes: ExtendedLinode[]) => {
return linodes.reduce((prevValue: number, linode: ExtendedLinode) => {
return (
prevValue +
pathOr(0, ['typeInfo', 'addons', 'backups', 'price', 'monthly'], linode)
);
}, 0);
} | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(prevValue: number, linode: ExtendedLinode) => {
return (
prevValue +
pathOr(0, ['typeInfo', 'addons', 'backups', 'price', 'monthly'], linode)
);
} | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(e: React.MouseEvent<HTMLButtonElement>) => {
const {
actions: { enable, enroll },
accountBackups,
} = this.props;
if (accountBackups) {
enable();
} else {
enroll();
}
} | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(
dispatch: ThunkDispatch,
ownProps
) => {
return {
actions: {
enable: () => dispatch(enableAllBackups()),
close: () => dispatch(handleClose()),
dismissError: () => dispatch(handleResetError()),
dismissSuccess: () => dispatch(handleResetSuccess()),
enroll: () => dispatch(enableA... | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
() => dispatch(enableAllBackups()) | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
() => dispatch(handleClose()) | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
() => dispatch(handleResetError()) | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
() => dispatch(handleResetSuccess()) | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
() => dispatch(enableAutoEnroll()) | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
() => dispatch(handleAutoEnrollToggle()) | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(types: LinodeType[], linodes: Linode[]) =>
linodes.map((linode) => {
const typeInfo = getTypeInfo(linode.type, types || []);
return {
...linode,
typeInfo,
};
}) | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(linode) => {
const typeInfo = getTypeInfo(linode.type, types || []);
return {
...linode,
typeInfo,
};
} | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(
errors: BackupError[],
linodes: LinodeWithTypeInfo[]
) =>
linodes.map((linode: LinodeWithTypeInfo) => {
const linodeError = errors.find(
(error) => Number(error.linodeId) === Number(linode.id)
);
return {
...linode,
linodeError,
};
}) | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(linode: LinodeWithTypeInfo) => {
const linodeError = errors.find(
(error) => Number(error.linodeId) === Number(linode.id)
);
return {
...linode,
linodeError,
};
} | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(error) => Number(error.linodeId) === Number(linode.id) | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(
linodes: Linode[],
errors: BackupError[],
types: LinodeType[]
) => {
const linodesWithTypes = addTypeInfo(types, linodes);
return addErrors(errors, linodesWithTypes);
} | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(state: ApplicationState, ownProps: CombinedProps) => {
const enableErrors = pathOr([], ['backups', 'enableErrors'], state);
const linodes = getLinodesWithoutBackups(state.__resources);
return {
accountBackups: accountBackupsEnabled,
backupLoadError: pathOr('', ['backups', 'error'], state),
backupsLo... | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(state: ApplicationState, ownProps) => ({
typesData: state.__resources.types.entities,
}) | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ClassDeclaration |
export class BackupDrawer extends React.Component<CombinedProps, {}> {
componentDidUpdate() {
const { close, dismissSuccess } = this.props.actions;
const { autoEnroll, enableSuccess, updatedCount } = this.props;
if (enableSuccess) {
const pluralizedLinodes =
updatedCount > 1 ? 'Linodes have... | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
InterfaceDeclaration |
interface DispatchProps {
actions: {
enable: () => void;
enroll: () => void;
close: () => void;
dismissError: () => void;
dismissSuccess: () => void;
toggle: () => void;
};
} | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
InterfaceDeclaration |
interface StateProps {
accountBackups: boolean;
open: boolean;
loading: boolean;
enabling: boolean;
backupLoadError: string;
linodesWithoutBackups: ExtendedLinode[];
backupsLoading: boolean;
enableSuccess: boolean;
enableErrors?: BackupError[];
autoEnroll: boolean;
autoEnrollError?: string;
enr... | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
InterfaceDeclaration |
interface WithTypesProps {
typesData: LinodeType[];
} | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
TypeAliasDeclaration |
type CombinedProps = DispatchProps &
StateProps &
WithTypesProps &
WithSnackbarProps; | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
MethodDeclaration |
componentDidUpdate() {
const { close, dismissSuccess } = this.props.actions;
const { autoEnroll, enableSuccess, updatedCount } = this.props;
if (enableSuccess) {
const pluralizedLinodes =
updatedCount > 1 ? 'Linodes have' : 'Linode has';
const text = autoEnroll
? `${updatedCount... | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
MethodDeclaration |
render() {
const {
accountBackups,
actions: { close, toggle },
autoEnroll,
autoEnrollError,
enableErrors,
enabling,
enrolling,
linodesWithoutBackups,
loading,
open,
updatedCount,
} = this.props;
const linodeCount = linodesWithoutBackups.leng... | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
MethodDeclaration |
getFailureNotificationText(updatedCount, enableErrors | harrinry/manager | packages/manager/src/features/Backups/BackupDrawer.tsx | TypeScript |
ArrowFunction |
(goToSection) => (
<>
<p>
이 | TommyVV/documentation | src/data/kr/api.tsx | TypeScript |
ArrowFunction |
(goToSection) => (
<>
<p>
입력의 | TommyVV/documentation | src/data/kr/api.tsx | TypeScript |
ArrowFunction |
(goToSection) => (
<p>
스키마 | TommyVV/documentation | src/data/kr/api.tsx | TypeScript |
ArrowFunction |
(goToSection) => (
<>
<h2 className={typographyStyles.title}>커스텀 | TommyVV/documentation | src/data/kr/api.tsx | TypeScript |
ArrowFunction |
() => (
<>
<p>각 | TommyVV/documentation | src/data/kr/api.tsx | TypeScript |
ArrowFunction |
(goToSection) => (
<p>
<b className={typographyStyles.note}>참고 | TommyVV/documentation | src/data/kr/api.tsx | TypeScript |
ArrowFunction |
(goToSection) => ({
title: "reset",
description: (
<>
<p>
이 함수는 폼 안의 필드 값과 에러를 초기화(reset) 합니다. | TommyVV/documentation | src/data/kr/api.tsx | TypeScript |
MethodDeclaration |
초기화(reset) | TommyVV/documentation | src/data/kr/api.tsx | TypeScript |
ArrowFunction |
(props: IProps) => {
return (
<div className={styles._local}>
<Icon className='num_icon' name={props.icon} size={48} />
<div className='flex flex_column'>
<span className='num_title line_clamp_1'>{props.name}</span>
<div className='num_wrap flex align_end'>
<CountUp
className='num'
st... | YaoApp/xgen | src/cloud/components/chart/NumberCard/index.tsx | TypeScript |
InterfaceDeclaration |
interface IProps {
name: string
data: number
icon: string
unit?: string
} | YaoApp/xgen | src/cloud/components/chart/NumberCard/index.tsx | TypeScript |
FunctionDeclaration |
function set<T>(key: LocalStorageKey, value: T): void {
localStorage.setItem(key, JSON.stringify(value))
} | Christian-G-UT/covid19_scenarios | src/helpers/localStorage.ts | TypeScript |
FunctionDeclaration |
function get<T>(key: LocalStorageKey): T | null {
const value = localStorage.getItem(key)
try {
return value !== null ? JSON.parse(value) : value
} catch {
return (value as unknown) as T
}
} | Christian-G-UT/covid19_scenarios | src/helpers/localStorage.ts | TypeScript |
TypeAliasDeclaration |
export type LocalStorageKey = typeof LOCAL_STORAGE_KEYS[keyof typeof LOCAL_STORAGE_KEYS] | Christian-G-UT/covid19_scenarios | src/helpers/localStorage.ts | TypeScript |
FunctionDeclaration |
export default function initMonitorSdk (config: userConfig,customPlugins?: any[]){
config.options = defaultToOptions(config.options); // 设置config的默认值
// 校验plugins的可执行性,即是否存在monitor方法并且该方法要是一个函数
if(Array.isArray(customPlugins) && customPlugins.findIndex(item => typeof item.monitor !== 'function') !== -1){
thr... | Sp-Luigi/monitor | packages/monitor-dom/src/index.ts | TypeScript |
ArrowFunction |
item => typeof item.monitor !== 'function' | Sp-Luigi/monitor | packages/monitor-dom/src/index.ts | TypeScript |
InterfaceDeclaration |
export interface Config {
areas: Array<any>;
categories: Array<any>;
country: string;
countryList: Array<any>;
ethnicities: Array<any>;
documents: Array<any>;
suburbs: string;
upgrades: Upgrades;
banners: Array<string>;
blocked_words: string;
} | SoftDevelopment007/Fuck_Aadvisor_Dating_WebApp | src/app/models/config.ts | TypeScript |
InterfaceDeclaration |
export interface Upgrades {
category: any;
ethnicity: any;
gold: any;
listing: any;
location: any;
} | SoftDevelopment007/Fuck_Aadvisor_Dating_WebApp | src/app/models/config.ts | TypeScript |
ArrowFunction |
() => {
const gridRef = createRef<HTMLDivElement>()
const [gridItemWidth, setGridItemWidth] = useState<number>()
const [prevWindowWidth, setPrevWindowWidth] = useState(0)
useEffect(() => {
const resizeListener = () => {
// no need to update when previous width is bigger
if (prevWindowWidth > w... | planecore/matanmashraki.com | src/hooks/useGridItemWidth.tsx | TypeScript |
ArrowFunction |
() => {
const resizeListener = () => {
// no need to update when previous width is bigger
if (prevWindowWidth > window.innerWidth) return
setPrevWindowWidth(window.innerWidth)
// get first item width
const parent = gridRef.current?.childNodes
if (!parent) return
setGridIte... | planecore/matanmashraki.com | src/hooks/useGridItemWidth.tsx | TypeScript |
ArrowFunction |
() => {
// no need to update when previous width is bigger
if (prevWindowWidth > window.innerWidth) return
setPrevWindowWidth(window.innerWidth)
// get first item width
const parent = gridRef.current?.childNodes
if (!parent) return
setGridItemWidth((parent.item(0) as any).offs... | planecore/matanmashraki.com | src/hooks/useGridItemWidth.tsx | TypeScript |
ArrowFunction |
() => window.removeEventListener("resize", resizeListener) | planecore/matanmashraki.com | src/hooks/useGridItemWidth.tsx | TypeScript |
FunctionDeclaration |
export function content(_content: HTMLElement, toc: HTMLElement, renderer: RendererLike<any, any>, file: File<string>) {
return (
<Page title={config.page.title.extractor(_content, config, file)}
favicon={config.page.favicon}
meta={<Meta {...config.page.meta}/>}
fonts={<Fonts {...co... | loreanvictor/rxpress | .codedoc/content/index.tsx | TypeScript |
InterfaceDeclaration |
export interface AppState {
planner?: PlannerState;
listPage?: ListPage;
boardView?: BoardViewState;
iterationPanel: {
iterationUI: states.IterationUIState
};
detailPage: {
comments: states.CommentState,
workItem: states.DetailWorkItemState,
linkType: states.LinkTypeState,
workItemL... | jarifibrahim/fabric8-planner | src/app/states/app.state.ts | TypeScript |
InterfaceDeclaration |
export interface BoardViewState {
boards: states.BoardState;
columnWorkItem: states.ColumnWorkItemState;
boardUi: states.BoardUIState;
} | jarifibrahim/fabric8-planner | src/app/states/app.state.ts | TypeScript |
InterfaceDeclaration |
export interface ListPage {} | jarifibrahim/fabric8-planner | src/app/states/app.state.ts | TypeScript |
InterfaceDeclaration |
export interface PlannerState {
iterations: states.IterationState;
labels: states.LabelState;
areas: states.AreaState;
collaborators: states.CollaboratorState;
users: states.UserState;
customQueries: states.CustomQueryState;
groupTypes: states.GroupTypeState;
space: states.SpaceState;
workItems: stat... | jarifibrahim/fabric8-planner | src/app/states/app.state.ts | TypeScript |
ClassDeclaration |
@NgModule({
declarations: [
CoreLoginSitesPage,
],
imports: [
CoreDirectivesModule,
IonicPageModule.forChild(CoreLoginSitesPage),
TranslateModule.forChild()
],
entryComponents: [
CoreLoginSitesPage
]
})
export class CoreLoginSitesPageModule {} | Abdulig/IOAphonegap | core/login/pages/sites/sites.module.ts | TypeScript |
FunctionDeclaration |
export function registerEndpointRoutes(router: IRouter, endpointAppContext: EndpointAppContext) {
const logger = getLogger(endpointAppContext);
router.post(
{
path: '/api/endpoint/metadata',
validate: {
body: schema.nullable(
schema.object({
paging_properties: schema.n... | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
FunctionDeclaration |
export async function getHostData(
metadataRequestContext: MetadataRequestContext,
id: string
): Promise<HostInfo | undefined> {
const query = getESQueryHostMetadataByID(id, metadataIndexPattern);
const response = (await metadataRequestContext.requestHandlerContext.core.elasticsearch.legacy.client.callAsCurren... | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
FunctionDeclaration |
async function findAgent(
metadataRequestContext: MetadataRequestContext,
hostMetadata: HostMetadata
): Promise<Agent | undefined> {
try {
return await metadataRequestContext.agentService.getAgent(
metadataRequestContext.requestHandlerContext.core.savedObjects.client,
hostMetadata.elastic.agent.i... | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
FunctionDeclaration |
async function mapToHostResultList(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
queryParams: Record<string, any>,
searchResponse: SearchResponse<HostMetadata>,
metadataRequestContext: MetadataRequestContext
): Promise<HostResultList> {
const totalNumberOfHosts = searchResponse?.aggregation... | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
FunctionDeclaration |
async function enrichHostMetadata(
hostMetadata: HostMetadata,
metadataRequestContext: MetadataRequestContext
): Promise<HostInfo> {
let hostStatus = HostStatus.ERROR;
let elasticAgentId = hostMetadata?.elastic?.agent?.id;
const log = metadataRequestContext.logger;
try {
/**
* Get agent status by ... | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
ArrowFunction |
(endpointAppContext: EndpointAppContext): Logger => {
return endpointAppContext.logFactory.get('metadata');
} | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
ArrowFunction |
async (context, req, res) => {
try {
const agentService = endpointAppContext.service.getAgentService();
if (agentService === undefined) {
throw new Error('agentService not available');
}
const metadataRequestContext: MetadataRequestContext = {
agentService,
... | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
ArrowFunction |
async (context, req, res) => {
const agentService = endpointAppContext.service.getAgentService();
if (agentService === undefined) {
return res.internalError({ body: 'agentService not available' });
}
const metadataRequestContext: MetadataRequestContext = {
agentService,
... | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
ArrowFunction |
(response) => response.inner_hits.most_recent.hits.hits | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
ArrowFunction |
(data) => data as HitSource | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
ArrowFunction |
async (entry) => enrichHostMetadata(entry._source, metadataRequestContext) | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
InterfaceDeclaration |
interface HitSource {
_source: HostMetadata;
} | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
InterfaceDeclaration |
interface MetadataRequestContext {
agentService: AgentService;
logger: Logger;
requestHandlerContext: RequestHandlerContext;
} | jakobheuer/kibana | x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts | TypeScript |
FunctionDeclaration |
export async function waitUntilHandleDoesNotMove(
selector: puppeteer.ElementHandle<Element> | null | undefined,
selectorName: string,
options: WaitOptions,
): Promise<void> {
if (!selector) {
return;
}
const waitIntervalForIsMovingFunc = 50;
const waitInterval = 10;
let elapsedTime = 0;
let sta... | franckLdx/puppeteer-core-controller | lib/actions/handle-actions/wait-until-handle-does-not-move/wait-until-handle-does-not-move.ts | TypeScript |
FunctionDeclaration | /**
* Groups pairs of consecutive emissions together and emits them as an array of
* two values.
*
* <span class="informal">Puts the current value and previous value together as
* an array, and emits that.</span>
*
* <img src="./img/pairwise.png" width="100%">
*
* The Nth emission from the source Observable wi... | Brownxin/positionmanager | node_modules/@angular-cli/ast-tools/node_modules/rxjs/src/operator/pairwise.ts | TypeScript |
ClassDeclaration |
class PairwiseOperator<T> implements Operator<T, [T, T]> {
call(subscriber: Subscriber<[T, T]>, source: any): any {
return source._subscribe(new PairwiseSubscriber(subscriber));
}
} | Brownxin/positionmanager | node_modules/@angular-cli/ast-tools/node_modules/rxjs/src/operator/pairwise.ts | TypeScript |
ClassDeclaration | /**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
class PairwiseSubscriber<T> extends Subscriber<T> {
private prev: T;
private hasPrev: boolean = false;
constructor(destination: Subscriber<[T, T]>) {
super(destination);
}
_next(value: T): void {
if (this.has... | Brownxin/positionmanager | node_modules/@angular-cli/ast-tools/node_modules/rxjs/src/operator/pairwise.ts | TypeScript |
InterfaceDeclaration |
export interface PairwiseSignature<T> {
(): Observable<[T, T]>;
} | Brownxin/positionmanager | node_modules/@angular-cli/ast-tools/node_modules/rxjs/src/operator/pairwise.ts | TypeScript |
MethodDeclaration |
call(subscriber: Subscriber<[T, T]>, source: any): any {
return source._subscribe(new PairwiseSubscriber(subscriber));
} | Brownxin/positionmanager | node_modules/@angular-cli/ast-tools/node_modules/rxjs/src/operator/pairwise.ts | TypeScript |
MethodDeclaration |
_next(value: T): void {
if (this.hasPrev) {
this.destination.next([this.prev, value]);
} else {
this.hasPrev = true;
}
this.prev = value;
} | Brownxin/positionmanager | node_modules/@angular-cli/ast-tools/node_modules/rxjs/src/operator/pairwise.ts | TypeScript |
InterfaceDeclaration | /**
* Props requis par toutes les chartes
*/
interface BaseProps {
width: number
height: number
/**
* Data qui feed les charts
*/
data: Data[]
} | Augora/Augora | src/types/chart-types.d.ts | TypeScript |
InterfaceDeclaration | /**
* Data des tooltip pour le component tooltip visx
*/
interface Tooltip {
/**
* Nom Complet du groupe
*/
key: string
/**
* Nombre de députés du groupe
*/
bar: number
/**
* Couleur du groupe
*/
color: string
/**
* Age, optionnel
*/
age?: nu... | Augora/Augora | src/types/chart-types.d.ts | TypeScript |
InterfaceDeclaration |
interface TooltipRange extends Tooltip {
age: string
} | Augora/Augora | src/types/chart-types.d.ts | TypeScript |
InterfaceDeclaration | /**
* Object contenant les infos des groupes pour les components visx
*/
interface Data {
/**
* Sigle du groupe
*/
id: string
/**
* Nom Complet du groupe
*/
label: string
/**
* Nombre de députés du groupe
*/
value: number
/**
* Couleur du groupe
... | Augora/Augora | src/types/chart-types.d.ts | TypeScript |
InterfaceDeclaration | /** Object contenant les infos des députés sur un âge */
interface AgeData {
age: number | string
groups: AgeGroupData
total: number
} | Augora/Augora | src/types/chart-types.d.ts | TypeScript |
TypeAliasDeclaration | /** Object contenant tous les sigles de groups en clé et une array de député */
type AgeGroupData = { [x: string]: Deputy.DeputiesList } | Augora/Augora | src/types/chart-types.d.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-comp-1348',
templateUrl: './comp-1348.component.html',
styleUrls: ['./comp-1348.component.css']
})
export class Comp1348Component implements OnInit {
constructor() { }
ngOnInit() {
}
} | angular/angular-cli-stress-test | src/app/components/comp-1348/comp-1348.component.ts | TypeScript |
ArrowFunction |
(): string => {
return this.paymentSolution().getName();
} | r0ndi/ts-design-patterns | MetodaWytworcza/src/pattern/creators/payment-creator.ts | TypeScript |
ClassDeclaration |
abstract class PaymentCreator {
protected abstract paymentSolution(): PaymentSolutionInterface;
public getPaymentSolutionName = (): string => {
return this.paymentSolution().getName();
}
} | r0ndi/ts-design-patterns | MetodaWytworcza/src/pattern/creators/payment-creator.ts | TypeScript |
MethodDeclaration |
protected abstract paymentSolution(): PaymentSolutionInterface; | r0ndi/ts-design-patterns | MetodaWytworcza/src/pattern/creators/payment-creator.ts | TypeScript |
FunctionDeclaration | /**
* Creates an action to assign the editor's document root.
* Triggers a freeze on the AstDocument.
*/
export function setDocument(astDoc: AST.AstDocument)
: SetDocumentAction {
return Object.freeze({
type: TypeKeys.SET_DOCUMENT,
astDoc: astDoc.freeze(CodeWords.FREEZE_OPTIONS) as AST.AstDoc... | AnmAtAnm/codewords-fork | codewords_core/src/action/set_document.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.