|
| 1 | +import * as React from 'react'; |
| 2 | + |
| 3 | +declare module 'core-coderoad' { |
| 4 | + |
| 5 | + interface ConfiguredStore { |
| 6 | + reducer: Redux.Reducer; |
| 7 | + devMode?: boolean; |
| 8 | + throttle?: Object; |
| 9 | + } |
| 10 | + |
| 11 | + // store |
| 12 | + export function configureStore(config: ConfiguredStore): Redux.Store; |
| 13 | + |
| 14 | + // polyfills |
| 15 | + export function loadPolyfills(): void; |
| 16 | + |
| 17 | + // options |
| 18 | + export const tutorialConfigOptions: Object; |
| 19 | + |
| 20 | + // selectors |
| 21 | + export function hintsSelector(state: CR.State): string[]; |
| 22 | + export function hintSelector(state: CR.State): string; |
| 23 | + export function pageSelector(state: CR.State): CR.Page; |
| 24 | + export function pageCompletedSelector(state: CR.State): boolean; |
| 25 | + export function tasksSelector(state: CR.State): CR.Task[]; |
| 26 | + export function currentTaskSelector(state: CR.State): CR.Task; |
| 27 | + export function visibleTasksSelector(state: CR.State): CR.Task[]; |
| 28 | + export function taskProgressSelector(state: CR.State): number; |
| 29 | + export function taskByIndexSelector(state: CR.State, props: { index: number }): CR.Task; |
| 30 | + export function configSelector(state: CR.State): Tutorial.Config; |
| 31 | + |
| 32 | + // modules |
| 33 | + |
| 34 | + // alert |
| 35 | + export function alertReducer(open: boolean, action: Action): boolean; |
| 36 | + export function alertOpen(alert: Object); |
| 37 | + export function alertReplay(); |
| 38 | + export function alertClose(); |
| 39 | + |
| 40 | + // editor |
| 41 | + export function dirReducer(name: string): string; |
| 42 | + export function editorReducer(name: string, action: Action): string; |
| 43 | + export function editorDevToolsToggle(); |
| 44 | + export function editorOpen(file: string, options?: Object); |
| 45 | + export function editorInsert(content: string); |
| 46 | + export function editorSet(content: string); |
| 47 | + export function editorSave(); |
| 48 | + export function editorScroll(content: string); |
| 49 | + export function save(); |
| 50 | + export function open(file: string, options?: Object); |
| 51 | + export function openFolder(); |
| 52 | + export function set(content: string); |
| 53 | + export function insert(content: string); |
| 54 | + export function openDevTools(); |
| 55 | + export function toggleDevTools(); |
| 56 | + export function clearConsole(); |
| 57 | + export function openTerminal(); |
| 58 | + export function closeAllPanels(); |
| 59 | + export function quit(); |
| 60 | + |
| 61 | + // route |
| 62 | + export function routeReducer(route: string, action: Action): string; |
| 63 | + export function routeSet(route: string); |
| 64 | + |
| 65 | + // window |
| 66 | + export function quit(); |
| 67 | + export function windowToggle(); |
| 68 | + export function windowReducer(open: boolean, action: Action): boolean; |
| 69 | + |
| 70 | + // components |
| 71 | + |
| 72 | + export function render(app: React.Component<any, any>, target: HTMLElement): void; |
| 73 | + |
| 74 | + export function highlight(text: string, lang: string): string; |
| 75 | + |
| 76 | + export const Alert: React.Component<any, any>; |
| 77 | + export const Markdown: React.Component<any, any>; |
| 78 | + // export const RouteButton: React.Component<any, any>; |
| 79 | + // export const MenuLink: React.Component<any, any>; |
| 80 | + |
| 81 | +} |
0 commit comments