You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many components will throw typescript errors due to insufficient alignment between '@react-pdf/types' and '@react-pdf/renderer/index.d.ts' ->
For example the "bookmark" prop will throw an error when added to any component because NodeProps interface doesn't have the "bookmark?: Bookmark" type.
Simply importing:
import { Bookmark } from '@react-pdf/types/bookmark';
Describe the bug
Many components will throw typescript errors due to insufficient alignment between '@react-pdf/types' and '@react-pdf/renderer/index.d.ts' ->
For example the "bookmark" prop will throw an error when added to any component because NodeProps interface doesn't have the "bookmark?: Bookmark" type.
Simply importing:
import { Bookmark } from '@react-pdf/types/bookmark';
and then adding -
interface NodeProps {
id?: string;
style?: Style | Style[];
fixed?: boolean;
break?: boolean;
minPresenceAhead?: number;
bookmark?: Bookmark;
}
-addresses this issue. But obviously an update in the package manager (adding/removing other libs) will constantly overwrite the types directory.
Is there any plans to remedy these type issues? Otherwise - what would you recommend?
The text was updated successfully, but these errors were encountered: