From 3bbda6308facc70a65ed1377f940f98a69b2118c Mon Sep 17 00:00:00 2001 From: Daniel Volquardsen Date: Sat, 23 Feb 2019 08:33:51 +0100 Subject: [PATCH] Typescript types :D adding typescript types --- index.d.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..2eb1d16 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,29 @@ +declare module 'terminal-in-react' { + import Component = React.Component; + import CSSProperties = React.CSSProperties; + + export default class Terminal extends Component<{ + style?: CSSProperties; + color?: string; + outputColor?: string; + backgroundColor?: string; + prompt?: string; + barColor?: string; + description?: {}; + commands?: {}; + msg?: string; + watchConsoleLogging?: boolean; + commandPassThrough?: (cmd: string, print: () => void) => void; + promptSymbol?: string; + plugins?: any[]; + startState?: 'open' | 'maximised' | 'minimised' | 'closed'; + showActions?: boolean; + hideTopBar?: boolean; + allowTabs?: boolean; + actionHandlers?: { + handleClose?: (toogleClose: () => void) => void; + handleMaximise?: (toggleMaximise: () => void) => void; + handleMinimise?: (toggleMinimise: () => void) => void; + }; + }> {} +}