Skip to content

Commit

Permalink
chore: use ts-essentials
Browse files Browse the repository at this point in the history
  • Loading branch information
fengtianze committed Jan 18, 2024
1 parent 47b2791 commit df2635a
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-bananas-grin-233.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alauda/ui': minor
---

- [BREAKING CHANGE] refactor: remove unnecessary exports
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"storybook": "^7.4.0",
"storybook-dark-mode": "^3.0.1",
"stylelint": "^15.10.3",
"ts-essentials": "^9.4.1",
"ts-jest": "29.1.1",
"ts-node": "^10.9.1",
"yarn-deduplicate": "^6.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/button/button.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ValueOf } from '../types';
import { ValueOf } from 'ts-essentials';

export const ButtonType = {
Default: 'default',
Expand Down
3 changes: 1 addition & 2 deletions src/drawer/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ComponentType } from '@angular/cdk/portal';
import { TemplateRef } from '@angular/core';

import { ValueOf } from '../types';
import { ValueOf } from 'ts-essentials';

export const DrawerSize = {
Small: 'small',
Expand Down
2 changes: 1 addition & 1 deletion src/dropdown/dropdown.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ValueOf } from '../types';
import { ValueOf } from 'ts-essentials';

export const MenuItemType = {
Default: 'default',
Expand Down
2 changes: 1 addition & 1 deletion src/form/form.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ValueOf } from '../types';
import { ValueOf } from 'ts-essentials';

export const LabelPosition = {
Top: 'top',
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export * from './tree-select';
export { ComponentSize } from './types';
export {
AttrBoolean,
Bem,
buildBem,
coerceAttrBoolean,
coerceString,
getCompatibleStylesRenderer,
Expand Down
2 changes: 1 addition & 1 deletion src/inline-alert/inline-alert.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ValueOf } from '../types';
import { ValueOf } from 'ts-essentials';

export const InlineAlertType = {
Primary: 'primary',
Expand Down
2 changes: 1 addition & 1 deletion src/radio/radio.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ValueOf } from '../types';
import { ValueOf } from 'ts-essentials';

export const RadioSize = {
Medium: 'medium',
Expand Down
2 changes: 1 addition & 1 deletion src/status-bar/status-bar.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ValueOf } from '../types';
import { ValueOf } from 'ts-essentials';

export interface Status {
type?: StatusType;
Expand Down
2 changes: 1 addition & 1 deletion src/steps/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ValueOf } from '../types';
import { ValueOf } from 'ts-essentials';

export const StepState = {
Default: 'default',
Expand Down
2 changes: 1 addition & 1 deletion src/tabs/tabs.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ValueOf } from '../types';
import { ValueOf } from 'ts-essentials';

export const TabSize = {
/** 卡片级尺寸 */
Expand Down
2 changes: 1 addition & 1 deletion src/tag/tag.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ValueOf } from '../types';
import { ValueOf } from 'ts-essentials';

export const TagType = {
Primary: 'primary',
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type ValueOf<T> = T[keyof T];
import { ValueOf } from 'ts-essentials';

export const ComponentSize = {
Large: 'large',
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18599,6 +18599,11 @@ ts-dedent@^2.0.0, ts-dedent@^2.2.0:
resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5"
integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==

ts-essentials@^9.4.1:
version "9.4.1"
resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-9.4.1.tgz#6a6b6f81c2138008a5eef216e9fa468d8d9e2ab4"
integrity sha512-oke0rI2EN9pzHsesdmrOrnqv1eQODmJpd/noJjwj2ZPC3Z4N2wbjrOEqnsEgmvlO2+4fBb0a794DCna2elEVIQ==

[email protected], ts-jest@^29.0.0:
version "29.1.1"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b"
Expand Down

0 comments on commit df2635a

Please sign in to comment.