Skip to content

Commit

Permalink
Pkg - Fix stupid TSC error // microsoft/TypeScript#42873
Browse files Browse the repository at this point in the history
  • Loading branch information
smastrom committed Nov 16, 2023
1 parent 239e56a commit adf3c4d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 15 additions & 2 deletions packages/vue-use-fixed-header/src/useFixedHeader.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -14,7 +23,11 @@ enum State {
export function useFixedHeader(
target: MaybeTemplateRef,
options: Partial<UseFixedHeaderOptions> = {},
) {
): {
styles: Readonly<CSS>
isLeave: Readonly<ComputedRef<boolean>>
isEnter: Readonly<ComputedRef<boolean>>
} {
// Config

const { enterStyles, leaveStyles } = TRANSITION_STYLES
Expand Down

0 comments on commit adf3c4d

Please sign in to comment.