Skip to content

Commit 3ce5807

Browse files
committed
feat: Update typing files
1 parent dc6eeee commit 3ce5807

File tree

7 files changed

+96
-242
lines changed

7 files changed

+96
-242
lines changed

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"clean-react-types": "rm -rf node_modules/@types/react",
7+
"clean-react-types": "rm -rf node_modules/@types/react node_modules/@types/node",
88
"start": "npm-run-all clean-react-types build-html:dev server:dev",
99
"preprod": "npm-run-all build server:prod",
1010
"server:dev": "cross-env NODE_ENV=development ts-node server.ts",

scripts/rewriteFile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
const path = require('path')
21
const fs = require('fs')
32

43
process.chdir(__dirname)
54

65
const packageFile = '../build/package.json'
7-
const typingFile = '../build/index.d.ts'
6+
const originTypingFile = '../typings/index.d.ts'
7+
const buildTypingFile = '../build/index.d.ts'
88
const packageData = JSON.parse(fs.readFileSync(packageFile))
99
packageData.scripts = void 0
1010
packageData.devDependencies['@types/react-router'] = void 0
1111

1212
fs.writeFileSync(packageFile, JSON.stringify(packageData, null, 2))
1313

14-
fs.writeFileSync(typingFile, fs.readFileSync(typingFile, 'utf8') + '\n' + fs.readFileSync('../typings/index.d.ts', 'utf8'))
14+
fs.writeFileSync(buildTypingFile, fs.readFileSync(originTypingFile, 'utf8'))

src/index.d.ts

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import * as tinycolor from "tinycolor2";
2+
import * as accentColors from "./styles/accentColors";
3+
4+
export { tinycolor };
5+
export { accentColors };
6+
7+
export { default as AppBarButton, AppBarButtonButtonProps } from "./AppBarButton";
8+
export { default as AppBarSeparator, AppBarSeparatorProps } from "./AppBarSeparator";
9+
export { default as AutoSuggestBox, AutoSuggestBoxProps, AutoSuggestBoxState } from "./AutoSuggestBox";
10+
11+
export { default as Button, ButtonProps } from "./Button";
12+
13+
export { default as CalendarDatePicker, CalendarDatePickerProps, CalendarDatePickerState } from "./CalendarDatePicker";
14+
export { default as CalendarView, CalendarViewProps, CalendarViewState } from "./CalendarView";
15+
export { default as CheckBox, CheckBoxProps, CheckBoxState } from "./CheckBox";
16+
export { default as ColorPicker, ColorPickerProps, ColorPickerState } from "./ColorPicker";
17+
export { default as CommandBar, CommandBarProps, CommandBarState } from "./CommandBar";
18+
export { default as ContentDialog, ContentDialogProps } from "./ContentDialog";
19+
20+
export { default as DatePicker, DatePickerProps, DatePickerState } from "./DatePicker";
21+
export { default as Dialog, DialogProps, DialogState } from "./Dialog";
22+
export { default as DropDownMenu, DropDownMenuProps, DropDownMenuState } from "./DropDownMenu";
23+
24+
export { default as FlipView, FlipViewProps, FlipViewState } from "./FlipView";
25+
export { default as FloatNav, FloatNavProps, FloatNavState } from "./FloatNav";
26+
export { default as Flyout, FlyoutProps } from "./Flyout";
27+
export { default as FlyoutContent, FlyoutContentProps, FlyoutContentState } from "./FlyoutContent";
28+
29+
export { default as HyperLink, HyperLinkProps } from "./HyperLink";
30+
31+
export { default as Icon, IconProps, IconState } from "./Icon";
32+
export { default as IconButton, IconButtonProps } from "./IconButton";
33+
34+
export { default as Image, ImageProps } from "./Image";
35+
export { default as Link, LinkProps } from "./Link";
36+
export { default as ListView, ListViewProps, ListViewState } from "./ListView";
37+
export { default as MarkdownRender, MarkdownRenderProps } from "./MarkdownRender";
38+
export { default as MediaPlayer, MediaPlayerProps, MediaPlayerState } from "./MediaPlayer";
39+
export { default as NavigationView, NavigationViewProps, NavigationViewState } from "./NavigationView";
40+
export { default as Menu, MenuProps, MenuState, MenuItem, MenuItemProps } from "./Menu";
41+
42+
export { default as PasswordBox, PasswordBoxProps, PasswordBoxState } from "./PasswordBox";
43+
export { default as ProgressBar, ProgressBarProps, ProgressBarState } from "./ProgressBar";
44+
export { default as ProgressRing, ProgressRingProps } from "./ProgressRing";
45+
46+
export { default as RadioButton, RadioButtonProps, RadioButtonState } from "./RadioButton";
47+
export { default as RatingControl, RatingControlProps, RatingControlState } from "./RatingControl";
48+
export { default as RenderToBody, RenderToBodyProps } from "./RenderToBody";
49+
50+
export { default as ScrollBar, ScrollBarProps, ScrollBarState } from "./ScrollBar";
51+
export { default as ScrollReveal, ScrollRevealProps } from "./ScrollReveal";
52+
export { default as SemanticZoom, SemanticZoomProps, SemanticZoomState } from "./SemanticZoom";
53+
export { default as Separator, SeparatorProps } from "./Separator";
54+
export { default as Slider, SliderProps, SliderState } from "./Slider";
55+
export { default as SplitView, SplitViewPaneProps, SplitViewPane } from "./SplitView";
56+
export { default as SplitViewCommand, SplitViewCommandProps } from "./SplitViewCommand";
57+
export { default as Swipe, SwipeProps, SwipeState } from "./Swipe";
58+
59+
export { default as Tabs, TabsProps, TabsState } from "./Tabs";
60+
export { default as TextBox, TextBoxProps, TextBoxState } from "./TextBox";
61+
export { Theme, ThemeProps, ThemeState } from "./Theme";
62+
export { default as TimePicker, TimePickerProps, TimePickerState } from "./TimePicker";
63+
export { default as Toast, ToastProps, ToastState } from "./Toast";
64+
export { default as Toggle, ToggleProps, ToggleState } from "./Toggle";
65+
export { default as Tooltip, TooltipProps, TooltipState } from "./Tooltip";
66+
export { default as TreeView, TreeViewProps, TreeViewState } from "./TreeView";
67+
68+
export { default as addCSSRule } from "./common/browser/addCSSRule";
69+
export { default as darkTheme } from "./styles/darkTheme";
70+
export { default as getTheme } from "./styles/getTheme";
71+
export { default as lightTheme } from "./styles/lightTheme";
72+
export { ScaleInOut, SlideInOut, FadeInOut, CustomAnimate } from "./Animate";
73+
74+
export { Theme as ThemeType } from "./styles/getTheme";
75+
export { StyleManager, CustomCSSProperties } from "./styles/StyleManager";
76+
77+
export as namespace ReactUWP;

src/index.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import * as tinycolor from "tinycolor2";
2+
import * as accentColors from "./styles/accentColors";
3+
4+
export { tinycolor };
5+
export { accentColors };
6+
17
export { default as AppBarButton, AppBarButtonButtonProps } from "./AppBarButton";
28
export { default as AppBarSeparator, AppBarSeparatorProps } from "./AppBarSeparator";
39
export { default as AutoSuggestBox, AutoSuggestBoxProps, AutoSuggestBoxState } from "./AutoSuggestBox";
@@ -52,7 +58,7 @@ export { default as Swipe, SwipeProps, SwipeState } from "./Swipe";
5258

5359
export { default as Tabs, TabsProps, TabsState } from "./Tabs";
5460
export { default as TextBox, TextBoxProps, TextBoxState } from "./TextBox";
55-
export { default as Theme, ThemeProps, ThemeState } from "./Theme";
61+
export { Theme, ThemeProps, ThemeState } from "./Theme";
5662
export { default as TimePicker, TimePickerProps, TimePickerState } from "./TimePicker";
5763
export { default as Toast, ToastProps, ToastState } from "./Toast";
5864
export { default as Toggle, ToggleProps, ToggleState } from "./Toggle";
@@ -63,10 +69,7 @@ export { default as addCSSRule } from "./common/browser/addCSSRule";
6369
export { default as darkTheme } from "./styles/darkTheme";
6470
export { default as getTheme } from "./styles/getTheme";
6571
export { default as lightTheme } from "./styles/lightTheme";
66-
export { accentColors };
67-
import * as accentColors from "./styles/accentColors";
68-
69-
export * from "./Animate";
72+
export { ScaleInOut, SlideInOut, FadeInOut, CustomAnimate } from "./Animate";
7073

71-
import * as tinycolor from "tinycolor2";
72-
export { tinycolor };
74+
export { Theme as ThemeType } from "./styles/getTheme";
75+
export { StyleManager, CustomCSSProperties } from "./styles/StyleManager";

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
"**/*.ts",
3030
"**/*.tsx"
3131
],
32+
"files": [
33+
"./src/index.d.ts"
34+
],
3235
"include": [
3336
"*.ts",
3437
"**/*.ts",

tslint.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
true,
1111
"tab"
1212
],
13-
"no-unused-expression": true,
13+
"no-unused-expression": false,
1414
"no-duplicate-variable": true,
1515
"no-eval": true,
16-
"no-internal-module": true,
16+
"no-internal-module": false,
1717
"no-trailing-whitespace": true,
1818
"no-unsafe-finally": true,
1919
"no-var-keyword": true,

typings/index.d.ts

Lines changed: 0 additions & 229 deletions
This file was deleted.

0 commit comments

Comments
 (0)