Skip to content

Commit

Permalink
Add typing for TitleManager
Browse files Browse the repository at this point in the history
  • Loading branch information
danetsao committed Nov 6, 2023
1 parent 78465bc commit a7646d7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/typings/stripes/core.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type ky from 'ky';
import type { Context, FunctionComponent, ReactNode } from 'react';
import React from 'react';

export type CalloutContextType = {
sendCallout: (args: {
Expand All @@ -12,6 +13,9 @@ export const CalloutContext: Context<CalloutContextType>;

export interface StripesType {
hasPerm: (perm: string) => boolean;
config?: {
platformName?: string;
};
}

export function useStripes(): StripesType;
Expand All @@ -21,6 +25,14 @@ export const IfPermission: FunctionComponent<{
children: ReactNode | ((props: { hasPermission: boolean }) => ReactNode);
}>;

export const TitleManager: React.Component<{
children?: ReactNode;
prefix?: string;
page?: string;
record?: string;
stripes?: StripesType;
}>;

export function useOkapiKy(): typeof ky;

export as namespace STCOR;

0 comments on commit a7646d7

Please sign in to comment.