Skip to content

Commit

Permalink
chore: ts fix
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Dec 10, 2024
1 parent a50fdf9 commit ffc9faa
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"dependencies": {
"path-to-regexp": "^6.2.0",
"postcss": "^8.4.14",
"qs": "6.9.7"
"qs": "6.9.7",
"tslib": "^2.8.1"
},
"devDependencies": {
"@babel/generator": "^7.22.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-core/src/WithRootStore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function withRootStore<

const result = hoistNonReactStatic(
class extends React.Component<OuterProps> {
static displayName = `WithRootStore(${
static displayName: string = `WithRootStore(${
ComposedComponent.displayName || ComposedComponent.name
})`;
static contextType = RootStoreContext;
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-core/src/env.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export function withRendererEnv<

const result = hoistNonReactStatic(
class extends React.Component<OuterProps> {
static displayName = `WithEnv(${
static displayName: string = `WithEnv(${
ComposedComponent.displayName || ComposedComponent.name
})`;
static contextType = EnvContext;
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-core/src/locale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function localeable<

const result = hoistNonReactStatic(
class extends React.Component<OuterProps> {
static displayName = `I18N(${
static displayName: string = `I18N(${
ComposedComponent.displayName || ComposedComponent.name
})`;
static contextType = LocaleContext;
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-core/src/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export function themeable<

const result = hoistNonReactStatic(
class extends React.Component<OuterProps> {
static displayName = `Themeable(${
static displayName: string = `Themeable(${
ComposedComponent.displayName || ComposedComponent.name
})`;
static contextType = ThemeContext;
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-ui/src/components/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export default Badge;
export function withBadge<P extends object>(Component: React.ComponentType<P>) {
return hoistNonReactStatic(
class WithBadge extends React.Component<P & BadgeProps> {
static displayName = `WithBadge(${
static displayName: string = `WithBadge(${
Component.displayName || Component.name
})`;

Expand Down
2 changes: 1 addition & 1 deletion packages/amis-ui/src/components/WithStore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function withStore<K extends IAnyStateTreeNode>(

const result = hoistNonReactStatic(
class extends React.Component<OuterProps> {
static displayName = `WithStore(${
static displayName: string = `WithStore(${
ComposedComponent.displayName || 'Unkown'
})`;
static ComposedComponent = ComposedComponent as React.ComponentType<T>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ exports[`Renderer:TabsTransferPicker: dialog open 1`] = `
role="tablist"
>
<li
class="cxd-Tabs-link is-active"
class="cxd-Tabs-link is-active cxd-TabsTransfer-tab"
>
<a
title="成员"
Expand All @@ -325,7 +325,7 @@ exports[`Renderer:TabsTransferPicker: dialog open 1`] = `
</a>
</li>
<li
class="cxd-Tabs-link"
class="cxd-Tabs-link cxd-TabsTransfer-tab"
>
<a
title="角色"
Expand All @@ -338,7 +338,7 @@ exports[`Renderer:TabsTransferPicker: dialog open 1`] = `
</a>
</li>
<li
class="cxd-Tabs-link"
class="cxd-Tabs-link cxd-TabsTransfer-tab"
>
<a
title="部门"
Expand Down

0 comments on commit ffc9faa

Please sign in to comment.