From adf3c4d18e506db4dc1a96b6b1b8e02b7e154c5d Mon Sep 17 00:00:00 2001 From: smastrom Date: Thu, 16 Nov 2023 12:40:45 +0100 Subject: [PATCH] Pkg - Fix stupid TSC error // https://github.com/microsoft/TypeScript/issues/42873 --- .github/workflows/publish.yml | 7 ++++++- .../vue-use-fixed-header/src/useFixedHeader.ts | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e90f06d..a110980 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,8 +22,13 @@ jobs: with: node-version: '20.x' registry-url: 'https://registry.npmjs.org' + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + run_install: true - name: Build package - run: npm install && npm run build + run: pnpm build - name: Copy README and LICENSE run: cp README.md LICENSE packages/vue-use-fixed-header - name: Pack diff --git a/packages/vue-use-fixed-header/src/useFixedHeader.ts b/packages/vue-use-fixed-header/src/useFixedHeader.ts index 31884d3..dfaaf12 100644 --- a/packages/vue-use-fixed-header/src/useFixedHeader.ts +++ b/packages/vue-use-fixed-header/src/useFixedHeader.ts @@ -1,4 +1,13 @@ -import { shallowRef, ref, unref, watch, computed, readonly, type CSSProperties as CSS } from 'vue' +import { + shallowRef, + ref, + unref, + watch, + computed, + readonly, + type ComputedRef, + type CSSProperties as CSS, +} from 'vue' import { useReducedMotion, isBrowser } from './utils' import { TRANSITION_STYLES } from './constants' @@ -14,7 +23,11 @@ enum State { export function useFixedHeader( target: MaybeTemplateRef, options: Partial = {}, -) { +): { + styles: Readonly + isLeave: Readonly> + isEnter: Readonly> +} { // Config const { enterStyles, leaveStyles } = TRANSITION_STYLES