type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(box) => (box.layout.top += shadow.height) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
() => {
if (!assetGraphData) {
return {bundles: {}, bundleForAssetId: {}, boxes: [], edges: []};
}
const assetIds = Object.keys(assetGraphData.nodes);
const bundles = identifyBundles(assetIds);
const bundleForAssetId: {[assetId: string]: string} = {};
for (const [bundleId, childrenIds] o... | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(c) => (bundleForAssetId[c] = bundleId) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(id) => !bundleForAssetId[id] | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(id) => (bundleForAssetId[id] = NONE_BUNDLE) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
([from, downstreams]) =>
Object.keys(downstreams).map((to) => ({from, to})) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(to) => ({from, to}) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(e) => ({from: bundleForAssetId[e.from], to: bundleForAssetId[e.to]}) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
({assetGraphData}) => {
const [highlighted, setHighlighted] = React.useState<string | null>(null);
const [expanded, setExpanded] = React.useState<string | null>(null);
const {viewport, containerProps} = useViewport();
const layout = useAssetGridLayout(assetGraphData, viewport.width);
const {edges, bundleForA... | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
() => expandBoxes(layout, expanded, viewport.width) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(id) => ({path: JSON.parse(id)}) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(b) => expanded !== b.id | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(b) => b.id | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(e) => ({
from: renderedIds[e.from] ? e.from : bundleForAssetId[e.from] || e.from,
to: renderedIds[e.to] ? e.to : bundleForAssetId[e.to] || e.to,
}) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(s) => s.top + s.height | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(shadow) => (
<div
key={shadow.top} | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(b) => !b.contentIds.length | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(box) => (
<div
key={box.id} | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(b) => b.contentIds.length | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(box) => (
<AssetGridItem
key={box.id} | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
({
boxes,
edges,
highlighted,
expanded,
}: {
boxes: Box[];
highlighted: string | null;
expanded: string | null;
edges: {from: string; to: string}[];
}) => {
const highlightedEdges =
highlighted && highlighted !== expanded
? edges.filter((e) => e.from === highlighted || e.to === highlighted)... | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(e) => e.from === highlighted || e.to === highlighted | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(e) => expandedChildren.includes(e.from) || expandedChildren.includes(e.to) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(b) => b.layout.width + b.layout.left | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(b) => b.layout.height + b.layout.top | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(e) => e.to === highlighted | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(e) => e.from === highlighted | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
({boxes, edges, color, zIndex, width, height}) => {
const pointForAssetId = (bundleId: string) => {
const box = boxes.find((b) => b.id === bundleId);
if (!box) {
console.log(bundleId);
return {x: 0, y: 0};
}
const {width, height, left, top} = box.layout;
return {x: left + width / 2, y... | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(bundleId: string) => {
const box = boxes.find((b) => b.id === bundleId);
if (!box) {
console.log(bundleId);
return {x: 0, y: 0};
}
const {width, height, left, top} = box.layout;
return {x: left + width / 2, y: top + height / 2};
} | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(b) => b.id === bundleId | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(edge: {from: string; to: string}) => {
const source = pointForAssetId(edge.from);
source.x += boxes[0].layout.width / 2 - 24;
const target = pointForAssetId(edge.to);
target.x -= boxes[0].layout.width / 2 - 24;
if (source.y < target.y) {
target.y -= 30;
} else if (source.y > target.y) {... | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
(edge, idx) => (
<StyledPath
key={idx} | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
({
box,
expanded,
highlighted,
setHighlighted,
toggleExpanded,
}: {
box: Box;
highlighted: boolean;
setHighlighted: (s: string | null) => void;
expanded: boolean;
toggleExpanded: () => void;
}) => {
return (
<AssetNodeContainer
$selected={false}
$padded={false}
style={{
... | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
InterfaceDeclaration |
interface Box {
id: string;
contentIds: string[];
layout: {top: number; left: number; width: number; height: number};
} | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
TypeAliasDeclaration |
type Layout = ReturnType<typeof useAssetGridLayout>; | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
MethodDeclaration |
dForEdge(edge) | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
MethodDeclaration |
displayNameForAssetKey({path: JSON | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
MethodDeclaration |
instanceAssetsExplorerPathToURL({
opsQuery: `${tokenForAssetKey | unlearnai/dagster | js_modules/dagit/packages/core/src/assets/InstanceAssetGrid.tsx | TypeScript |
ArrowFunction |
props => {
const { size, withHoverEffect, color, margin, ...restProps } = props;
return (
<SvgIcon {...{ size, withHoverEffect, color, margin, ...restProps }}>
<SideEffect1546LineIconSvg {...restProps} width="1em" height="1em" />
</SvgIcon> | IshanKute/medly-components | packages/icons/src/icons/GSDD/SideEffect1546LineIcon.tsx | TypeScript |
ArrowFunction |
() => getFakeJobRole({ post }) | AnubhavUjjawal/test-project | src/migration/1632821322960-seed-jobs.ts | TypeScript |
ClassDeclaration |
export class seedJobs1632821322960 implements MigrationInterface {
name = 'seedJobs1632821322960'
public async up(queryRunner: QueryRunner): Promise<void> {
const connection = getConnection()
for (let index = 0; index < 3000000; index++) {
const HR = await connection.getRepository(Users)
... | AnubhavUjjawal/test-project | src/migration/1632821322960-seed-jobs.ts | TypeScript |
MethodDeclaration |
public async up(queryRunner: QueryRunner): Promise<void> {
const connection = getConnection()
for (let index = 0; index < 3000000; index++) {
const HR = await connection.getRepository(Users)
.createQueryBuilder("users")
.where("role_id = 'HIRING_MANAGER'")
.andW... | AnubhavUjjawal/test-project | src/migration/1632821322960-seed-jobs.ts | TypeScript |
MethodDeclaration |
public async down(queryRunner: QueryRunner): Promise<void> {
} | AnubhavUjjawal/test-project | src/migration/1632821322960-seed-jobs.ts | TypeScript |
TypeAliasDeclaration |
export type FlatVariant = typeof FlatVariants[keyof typeof FlatVariants]; | pplanel/puzzli-monorepo | apps/frontend/web-components/src/global/types/ColorVariants.ts | TypeScript |
TypeAliasDeclaration |
export type OutlineVariant = typeof OutlineVariants[keyof typeof OutlineVariants]; | pplanel/puzzli-monorepo | apps/frontend/web-components/src/global/types/ColorVariants.ts | TypeScript |
TypeAliasDeclaration |
export type ColorVariant = FlatVariant | OutlineVariant; | pplanel/puzzli-monorepo | apps/frontend/web-components/src/global/types/ColorVariants.ts | TypeScript |
ArrowFunction |
(zadano: | FornaxA/dash | src/qt/locale/ion_hr.ts | TypeScript |
ArrowFunction |
() => {
const tree = TestRenderer.create(<Rival/>).toJSON()
expect(tree).toMatchSnapshot()
} | AlexanderLapygin/bp | components/application/taste-court/court/rival.snapshot.test.tsx | TypeScript |
InterfaceDeclaration |
export interface MutableDashboard {
title: string;
meta: DashboardMeta;
destroy: () => void;
} | Dizzudin2/grafana6 | public/app/types/dashboard.ts | TypeScript |
InterfaceDeclaration |
export interface DashboardDTO {
redirectUri?: string;
dashboard: DashboardDataDTO;
meta: DashboardMeta;
} | Dizzudin2/grafana6 | public/app/types/dashboard.ts | TypeScript |
InterfaceDeclaration |
export interface DashboardMeta {
canSave?: boolean;
canEdit?: boolean;
canDelete?: boolean;
canShare?: boolean;
canStar?: boolean;
canAdmin?: boolean;
url?: string;
folderId?: number;
fullscreen?: boolean;
fromExplore?: boolean;
isEditing?: boolean;
canMakeEditable?: boolean;
submenuEnabled?:... | Dizzudin2/grafana6 | public/app/types/dashboard.ts | TypeScript |
InterfaceDeclaration |
export interface DashboardDataDTO {
title: string;
} | Dizzudin2/grafana6 | public/app/types/dashboard.ts | TypeScript |
InterfaceDeclaration |
export interface DashboardInitError {
message: string;
error: any;
} | Dizzudin2/grafana6 | public/app/types/dashboard.ts | TypeScript |
InterfaceDeclaration |
export interface DashboardState {
model: MutableDashboard | null;
initPhase: DashboardInitPhase;
isInitSlow: boolean;
initError?: DashboardInitError;
permissions: DashboardAcl[] | null;
modifiedQueries?: {
panelId: number;
queries: DataQuery[];
};
} | Dizzudin2/grafana6 | public/app/types/dashboard.ts | TypeScript |
EnumDeclaration |
export enum DashboardRouteInfo {
Home = 'home-dashboard',
New = 'new-dashboard',
Normal = 'normal-dashboard',
Scripted = 'scripted-dashboard',
} | Dizzudin2/grafana6 | public/app/types/dashboard.ts | TypeScript |
EnumDeclaration |
export enum DashboardInitPhase {
NotStarted = 'Not started',
Fetching = 'Fetching',
Services = 'Services',
Failed = 'Failed',
Completed = 'Completed',
} | Dizzudin2/grafana6 | public/app/types/dashboard.ts | TypeScript |
TypeAliasDeclaration |
export type KioskUrlValue = 'tv' | '1' | true; | Dizzudin2/grafana6 | public/app/types/dashboard.ts | TypeScript |
FunctionDeclaration |
export function useDialog(): [(container: ReactNode, onExited?: VoidFunction) => void, VoidFunction] {
const [createDialog, closeDialog] = React.useContext(DialogContext);
let idDialog: number = -1;
const handleOpen = useCallback(
(container: ReactNode, onExited?: VoidFunction) => {
idDialog = ++idd a... | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
FunctionDeclaration |
function DialogContainer({ children, open, onClose, onEnded }: DialogContainerProps) {
return (
<Dialog open={open} onClose={onClose} onEnded={onEnded}>
{children}
</Dialog>
);
} | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
FunctionDeclaration |
export default function DialogProvider({ children }: PropsWithChildren<{}>) {
const [dialogs, setDialogs] = React.useState<DialogParams[]>([]);
const [dialogsToRemove, setDialogsToRemove] = React.useState<number[]>([]);
useEffect(() => {
function removeDialog() {
if (dialogsToRemove.length > 0) {
... | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
FunctionDeclaration |
function removeDialog() {
if (dialogsToRemove.length > 0) {
setDialogs((dial) =>
dial.map((dialog) => {
if (dialog?.idDialog !== undefined && dialogsToRemove.indexOf(dialog.idDialog) !== -1) {
return { ...dialog, open: false };
}
return dialog;
... | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
FunctionDeclaration |
function createDialog(option: DialogParams): void {
return setDialogs((dial) => [...dial, { ...option, open: true }]);
} | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
FunctionDeclaration |
function closeDialog(idDialog?: number): void {
setDialogsToRemove((dial) => {
if (idDialog === undefined) {
const id = dialogs[dialogs.length - 1]?.idDialog;
if (id === undefined) {
return dial;
}
return [...dial, id];
}
return [...dial, idDialog];
... | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
ArrowFunction |
(container: ReactNode, onExited?: VoidFunction) => {
idDialog = ++idd as number;
createDialog({
children: container,
onExited,
idDialog,
});
} | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
ArrowFunction |
() => {
closeDialog(idDialog);
} | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
ArrowFunction |
() => {
function removeDialog() {
if (dialogsToRemove.length > 0) {
setDialogs((dial) =>
dial.map((dialog) => {
if (dialog?.idDialog !== undefined && dialogsToRemove.indexOf(dialog.idDialog) !== -1) {
return { ...dialog, open: false };
}
ret... | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
ArrowFunction |
(dial) =>
dial.map((dialog) => {
if (dialog?.idDialog !== undefined && dialogsToRemove.indexOf(dialog.idDialog) !== -1) {
return { ...dialog, open: false };
}
return dialog;
}) | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
ArrowFunction |
(dialog) => {
if (dialog?.idDialog !== undefined && dialogsToRemove.indexOf(dialog.idDialog) !== -1) {
return { ...dialog, open: false };
}
return dialog;
} | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
ArrowFunction |
(dial) => [...dial, { ...option, open: true }] | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
ArrowFunction |
(dial) => {
if (idDialog === undefined) {
const id = dialogs[dialogs.length - 1]?.idDialog;
if (id === undefined) {
return dial;
}
return [...dial, id];
}
return [...dial, idDialog];
} | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
ArrowFunction |
(dialog) => {
const { onClose, ...dialogParams } = dialog;
const handleOnEnded = () => {
if (dialog.onExited) {
dialog.onExited();
}
setDialogs((dial) => dial.slice(0, dial.length - 1));
};
return (
<DialogContainer key={dialog.idDia... | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
ArrowFunction |
() => {
if (dialog.onExited) {
dialog.onExited();
}
setDialogs((dial) => dial.slice(0, dial.length - 1));
} | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
ArrowFunction |
(dial) => dial.slice(0, dial.length - 1) | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
TypeAliasDeclaration |
type DialogParams = PropsWithChildren<{
idDialog?: number;
open?: boolean;
onClose?: VoidFunction;
onExited?: VoidFunction;
}>; | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
TypeAliasDeclaration |
type ProviderContext = readonly [(option: DialogParams) => void, (id?: number) => void]; | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
TypeAliasDeclaration |
type DialogContainerProps = PropsWithChildren<{
open: boolean;
onClose: VoidFunction;
onEnded: VoidFunction;
}>; | BertSa/Schedulator3000 | frontend/schedulator3000/src/hooks/useDialog.tsx | TypeScript |
InterfaceDeclaration |
export interface IMDIncGrp {
MDUpdateAction: string// 279
DeleteReason?: string// 285
MDSubBookType?: number// 1173
MarketDepth?: number// 264
MDEntryType?: string// 269
MDEntryID?: string// 278
MDEntryRefID?: string// 280
Instrument?: IInstrument
UndInstrmtGrp?: IUndInstrmtGrp
InstrmtLegGrp?: IIns... | pvtienhoa/jspurefix | src/types/FIX.5.0SP2/repo/set/md_inc_grp.ts | TypeScript |
ArrowFunction |
() => import('@/uiservice/sys-role-permission/sys-role-permission-ui-service') | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
ArrowFunction |
() => import('@/uiservice/sys-user/sys-user-ui-service') | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
ArrowFunction |
() => import('@/uiservice/sys-auth-log/sys-auth-log-ui-service') | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
ArrowFunction |
() => import('@/uiservice/sys-user-auth/sys-user-auth-ui-service') | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
ArrowFunction |
() => import('@/uiservice/sys-open-access/sys-open-access-ui-service') | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
ArrowFunction |
() => import('@/uiservice/sys-user-role/sys-user-role-ui-service') | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
ArrowFunction |
() => import('@/uiservice/sys-role/sys-role-ui-service') | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
ArrowFunction |
() => import('@/uiservice/sys-permission/sys-permission-ui-service') | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
ArrowFunction |
() => import('@/uiservice/sys-app/sys-app-ui-service') | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
ClassDeclaration | /**
* UI服务注册中心
*
* @export
* @class UIServiceRegister
*/
export class UIServiceRegister {
/**
* 所有UI实体服务Map
*
* @protected
* @type {*}
* @memberof UIServiceRegister
*/
protected allUIService: Map<string, () => Promise<any>> = new Map();
/**
* 已加载UI实体服务Map缓存
*
... | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
MethodDeclaration | /**
* 初始化
*
* @protected
* @memberof UIServiceRegister
*/
protected init(): void {
this.allUIService.set('sysrolepermission', () => import('@/uiservice/sys-role-permission/sys-role-permission-ui-service'));
this.allUIService.set('sysuser', () => import('@/uiservice/sys-u... | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
MethodDeclaration | /**
* 加载服务实体
*
* @protected
* @param {string} serviceName
* @returns {Promise<any>}
* @memberof UIServiceRegister
*/
protected async loadService(serviceName: string): Promise<any> {
const service = this.allUIService.get(serviceName);
if (service) {
return s... | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
MethodDeclaration | /**
* 获取应用实体服务
*
* @param {string} name
* @returns {Promise<any>}
* @memberof UIServiceRegister
*/
public async getService(name: string): Promise<any> {
if (this.serviceCache.has(name)) {
return this.serviceCache.get(name);
}
const entityService: any = a... | ibiz4j/ibizlab-runtime | ibzuaa/app_web/src/uiservice/ui-service-register.ts | TypeScript |
ArrowFunction |
(resolve) => {
this.http.post(url, data, { headers: this.getHeader() }).subscribe(
(response) => {
resolve(<ICommunication<TModel>>{
success: true,
data: response
});
},
(... | PauloHenriqueFernandesAraujo/AngularMaterializeStruct | src/app/generic/services/communication.service.ts | TypeScript |
ArrowFunction |
(response) => {
resolve(<ICommunication<TModel>>{
success: true,
data: response
});
} | PauloHenriqueFernandesAraujo/AngularMaterializeStruct | src/app/generic/services/communication.service.ts | TypeScript |
ArrowFunction |
(error) => {
let resultError = <ICommunication<TModel>>{
success: false,
statusCode: error.status,
data: error.error
};
this.errorValidate(resultError);
resolve(result... | PauloHenriqueFernandesAraujo/AngularMaterializeStruct | src/app/generic/services/communication.service.ts | TypeScript |
ArrowFunction |
(resolve) => {
this.http.get(url, { headers: this.getHeader() }).subscribe(
(response) => {
resolve(<ICommunication<TModel>>{
success: true,
data: response
});
},
(error) ... | PauloHenriqueFernandesAraujo/AngularMaterializeStruct | src/app/generic/services/communication.service.ts | TypeScript |
ArrowFunction |
(error) => {
let resultError = <ICommunication<TModel>>{
success: false,
statusCode: error.status,
data: error.error
};
this.errorValidate(resultError);
resolve(resul... | PauloHenriqueFernandesAraujo/AngularMaterializeStruct | src/app/generic/services/communication.service.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class CommunicationService {
constructor(public http: HttpClient, public router: Router) { }
public post<TModel>(url: string, data: any): Promise<ICommunication<TModel>> {
return new Promise((resolve) => {
this.http.post(url, data, { headers: this.getHeader() }).subsc... | PauloHenriqueFernandesAraujo/AngularMaterializeStruct | src/app/generic/services/communication.service.ts | TypeScript |
MethodDeclaration |
public post<TModel>(url: string, data: any): Promise<ICommunication<TModel>> {
return new Promise((resolve) => {
this.http.post(url, data, { headers: this.getHeader() }).subscribe(
(response) => {
resolve(<ICommunication<TModel>>{
success:... | PauloHenriqueFernandesAraujo/AngularMaterializeStruct | src/app/generic/services/communication.service.ts | TypeScript |
MethodDeclaration |
public get<TModel>(url: string): Promise<ICommunication<TModel>> {
return new Promise((resolve) => {
this.http.get(url, { headers: this.getHeader() }).subscribe(
(response) => {
resolve(<ICommunication<TModel>>{
success: true,
... | PauloHenriqueFernandesAraujo/AngularMaterializeStruct | src/app/generic/services/communication.service.ts | TypeScript |
MethodDeclaration |
getHeader(): HttpHeaders { return new HttpHeaders().set("Authorization", "Bearer " + this.getToken()).append('Content-Type', 'application/json'); } | PauloHenriqueFernandesAraujo/AngularMaterializeStruct | src/app/generic/services/communication.service.ts | TypeScript |
MethodDeclaration |
public getToken() {
let info = this.getLocalStorageToken();
if (info) return info['access_token'];
} | PauloHenriqueFernandesAraujo/AngularMaterializeStruct | src/app/generic/services/communication.service.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.