vtex / shoreline

VTEX Design System for back-office experiences. Currently available for internal usage at VTEX.
https://shoreline.vtex.com
23 stars 1 forks source link

Typescript errors in range-calendar.tsx #1853

Open kevinch opened 3 weeks ago

kevinch commented 3 weeks ago

Problem

While trying to pnpm build:docs I ran into the following TS errors:

src/components/range-calendar/range-calendar.tsx(28,39): error TS2345: Argument of type '{ createCalendar: (name: string) => Calendar; locale: string; defaultValue?: RangeValue<T> | null | undefined; autoFocus?: boolean; id?: string; 'aria-describedby'?: string; ... 17 more ...; allowsNonContiguousRanges?: boolean; }' is not assignable to parameter of type 'RangeCalendarStateOptions<DateValue>'.
src/components/range-calendar/range-calendar.tsx(37,22): error TS2345: Argument of type 'RangeCalendarProps<T>' is not assignable to parameter of type 'AriaRangeCalendarProps<DateValue>'.
src/components/range-calendar/range-calendar.tsx(70,26): error TS2344: Type 'T' does not satisfy the constraint 'DateValue'.

This on the main branch with a clean install via pnpm clean & pnpm i.

Node 21 on MACOS 14.6

Expected behavior

Clear docs build process.

Reproducible Example

pnpm build:docs

Suggested solution

No response

Additional context

No response

Package

@vtex/shoreline

Packages version

  "name": "@vtex/shoreline",
  "version": "1.5.3",

Browser

n/a

Package Manager

pnpm

kevinch commented 3 weeks ago

Not sure if this is related to the project or my local installation. Could be linked to https://github.com/vtex/shoreline/issues/1859

lucasaarcoverde commented 3 weeks ago

This on the main branch with a clean install via pnpm clean & pnpm I.

Does the error persist when you make a new git clone of the repo and try to run pnpm I && pnpm build?