chore(deps): bump typescript v5 (#11681)

This commit is contained in:
neverland
2023-03-18 08:46:01 +08:00
committed by GitHub
parent 7dce6d2f30
commit 1d5b37930a
27 changed files with 78 additions and 75 deletions
+1 -1
View File
@@ -34,7 +34,7 @@
"@types/fs-extra": "^11.0.1",
"release-it": "^15.4.1",
"rimraf": "^4.0.4",
"typescript": "^4.8.2"
"typescript": "^5.0.2"
},
"dependencies": {
"consola": "^2.11.3",
+1 -1
View File
@@ -40,7 +40,7 @@
"esbuild": "^0.16.10",
"release-it": "^15.4.1",
"rimraf": "^4.0.4",
"typescript": "^4.8.2"
"typescript": "^5.0.2"
},
"release-it": {
"git": {
+1 -1
View File
@@ -85,7 +85,7 @@
"release-it": "^15.4.1",
"terser": "^5.16.1",
"transliteration": "^2.3.5",
"typescript": "^4.8.2",
"typescript": "^5.0.2",
"vite": "^4.0.3",
"vite-plugin-md": "^0.11.9",
"vue-router": "^4.1.5"
+1 -1
View File
@@ -42,7 +42,7 @@
"esbuild": "^0.16.10",
"release-it": "^15.1.1",
"rimraf": "^4.0.4",
"typescript": "^4.7.4"
"typescript": "^5.0.2"
},
"release-it": {
"git": {
+1 -1
View File
@@ -31,7 +31,7 @@
"enhanced-resolve": "^5.12.0",
"eslint": "^8.31.0",
"jest": "^29.3.1",
"typescript": "^4.8.2"
"typescript": "^5.0.2"
},
"peerDependencies": {
"eslint": "^7.32.0 || ^8.2.0"
+1 -1
View File
@@ -41,7 +41,7 @@
"esbuild": "^0.16.10",
"release-it": "^15.4.1",
"rimraf": "^4.0.4",
"typescript": "^4.8.2"
"typescript": "^5.0.2"
},
"release-it": {
"git": {
+1 -1
View File
@@ -40,7 +40,7 @@
"esbuild": "^0.16.10",
"release-it": "^15.4.1",
"rimraf": "^4.0.4",
"typescript": "^4.8.2",
"typescript": "^5.0.2",
"vue": "^3.2.47"
},
"peerDependencies": {
+1 -1
View File
@@ -59,7 +59,7 @@
"@vant/icons": "workspace:*",
"@vue/runtime-core": "^3.2.47",
"@vue/test-utils": "^2.0.2",
"typescript": "^4.8.2",
"typescript": "^5.0.2",
"vue": "^3.2.47",
"vue-router": "^4.1.5"
},
+2 -2
View File
@@ -42,8 +42,8 @@ export function formatDataForCascade({
county_list: county = {},
province_list: province = {},
} = areaList;
const showCity = columnsNum > 1;
const showCounty = columnsNum > 2;
const showCity = +columnsNum > 1;
const showCounty = +columnsNum > 2;
const getProvinceChildren = () => {
if (showCity) {
+1 -1
View File
@@ -78,7 +78,7 @@ export default defineComponent({
const scroll = () => {
show.value = scrollParent.value
? getScrollTop(scrollParent.value) >= props.offset
? getScrollTop(scrollParent.value) >= +props.offset
: false;
};
+1 -1
View File
@@ -63,7 +63,7 @@ export default defineComponent({
return slots.content();
}
if (isDef(max) && isNumeric(content!) && +content > max) {
if (isDef(max) && isNumeric(content!) && +content > +max) {
return `${max}+`;
}
+2 -2
View File
@@ -333,7 +333,7 @@ export default defineComponent({
const checkRange = (date: [Date, Date]) => {
const { maxRange, rangePrompt, showRangePrompt } = props;
if (maxRange && calcDateNum(date) > maxRange) {
if (maxRange && calcDateNum(date) > +maxRange) {
if (showRangePrompt) {
showToast(rangePrompt || t('rangePrompt', maxRange));
}
@@ -451,7 +451,7 @@ export default defineComponent({
if (selectedIndex !== -1) {
const [unselectedDate] = dates.splice(selectedIndex, 1);
emit('unselect', cloneDate(unselectedDate));
} else if (props.maxRange && dates.length >= props.maxRange) {
} else if (props.maxRange && dates.length >= +props.maxRange) {
showToast(props.rangePrompt || t('rangePrompt', props.maxRange));
} else {
select([...dates, date]);
+1 -1
View File
@@ -38,7 +38,7 @@ export default defineComponent({
const value = modelValue.slice();
if (checked) {
const overlimit = max && value.length >= max;
const overlimit = max && value.length >= +max;
if (!overlimit && !value.includes(name)) {
value.push(name);
+2 -2
View File
@@ -281,7 +281,7 @@ export default defineComponent({
// see: https://github.com/vant-ui/vant/issues/5033
const limitValueLength = (value: string) => {
const { maxlength } = props;
if (isDef(maxlength) && getStringLength(value) > maxlength) {
if (isDef(maxlength) && getStringLength(value) > +maxlength) {
const modelValue = getModelValue();
if (modelValue && getStringLength(modelValue) === +maxlength) {
return modelValue;
@@ -322,7 +322,7 @@ export default defineComponent({
const { formatter, maxlength } = props;
value = formatter(value);
// The length of the formatted value may exceed maxlength.
if (isDef(maxlength) && getStringLength(value) > maxlength) {
if (isDef(maxlength) && getStringLength(value) > +maxlength) {
value = cutString(value, +maxlength);
}
if (inputRef.value && state.focused) {
+1 -1
View File
@@ -67,7 +67,7 @@ export default defineComponent({
const gutterValue = addUnit(gutter);
style.paddingRight = gutterValue;
if (index.value >= columnNum) {
if (index.value >= +columnNum) {
style.marginTop = gutterValue;
}
}
@@ -276,8 +276,9 @@ export default defineComponent({
resetScale();
}
if (state.scale > props.maxZoom) {
state.scale = +props.maxZoom;
const maxZoom = +props.maxZoom;
if (state.scale > maxZoom) {
state.scale = maxZoom;
}
}
}
+2 -1
View File
@@ -73,7 +73,8 @@ export default defineComponent({
return;
}
const { offset, direction } = props;
const { direction } = props;
const offset = +props.offset;
const scrollParentRect = useRect(scrollParent);
if (!scrollParentRect.height || isHidden(root)) {
@@ -174,7 +174,7 @@ export default defineComponent({
emit('update:modelValue', value.slice(0, value.length - 1));
} else if (type === 'close') {
onClose();
} else if (value.length < props.maxlength) {
} else if (value.length < +props.maxlength) {
emit('input', text);
emit('update:modelValue', value + text);
}
@@ -39,7 +39,8 @@ export default defineComponent({
const renderPoints = () => {
const Points: JSX.Element[] = [];
const { mask, value, length, gutter, focused } = props;
const { mask, value, gutter, focused } = props;
const length = +props.length;
for (let i = 0; i < length; i++) {
const char = value[i];
+1 -1
View File
@@ -21,7 +21,7 @@ export const progressProps = {
percentage: {
type: numericProp,
default: 0,
validator: (value: Numeric) => value >= 0 && value <= 100,
validator: (value: Numeric) => +value >= 0 && +value <= 100,
},
};
+2 -2
View File
@@ -122,11 +122,11 @@ export default defineComponent({
const current = ref(getInitialValue());
const minusDisabled = computed(
() => props.disabled || props.disableMinus || current.value <= +props.min
() => props.disabled || props.disableMinus || +current.value <= +props.min
);
const plusDisabled = computed(
() => props.disabled || props.disablePlus || current.value >= +props.max
() => props.disabled || props.disablePlus || +current.value >= +props.max
);
const inputStyle = computed(() => ({
+1 -1
View File
@@ -246,7 +246,7 @@ export default defineComponent({
const autoplay = () => {
stopAutoplay();
if (props.autoplay > 0 && count.value > 1) {
if (+props.autoplay > 0 && count.value > 1) {
autoplayTimer = setTimeout(() => {
next();
autoplay();
+1 -1
View File
@@ -120,7 +120,7 @@ export default defineComponent({
// whether the nav is scrollable
const scrollable = computed(
() =>
children.length > props.swipeThreshold ||
children.length > +props.swipeThreshold ||
!props.ellipsis ||
props.shrink
);
+1 -1
View File
@@ -73,7 +73,7 @@ export default defineComponent({
if (index !== -1) {
activeId.splice(index, 1);
} else if (activeId.length < props.max) {
} else if (activeId.length < +props.max) {
activeId.push(item.id);
}
} else {
+1 -1
View File
@@ -301,7 +301,7 @@ export default defineComponent({
const onClickUpload = (event: MouseEvent) => emit('clickUpload', event);
const renderUpload = () => {
if (props.modelValue.length >= props.maxCount) {
if (props.modelValue.length >= +props.maxCount) {
return;
}
+1 -1
View File
@@ -39,7 +39,7 @@ export function isOversize(
if (isFunction(maxSize)) {
return maxSize(item.file);
}
return item.file.size > maxSize;
return item.file.size > +maxSize;
}
return false;
});