type augmentation in monorepo with turbo-repo

Not strictly solid specifacally related but wanted to try my luck here anyway, since i'm working on this in a solid-project. I have a monorepo setup with turbo-repo and trying to do "type augmentation" for LinkProps. I have a ui package set up of which i want to augment some props. The file looks like this: packages/ui/src/_lib/types.ts and its content:
ts export type LinkOverrideProps = {};
ts export type LinkOverrideProps = {};
The package json of the ui package:
{
"name": "@cgrd-modules/ui",
"version": "1.0.0",
"description": "",
"type": "module",
"dependencies": {
"@cgrd-modules/utils": "*",
"@kobalte/core": "0.13.7"
},
"exports": {
....
"./types": "./src/_lib/types.ts"
},
"imports": {
"~/*": "./src/*"
}
}
{
"name": "@cgrd-modules/ui",
"version": "1.0.0",
"description": "",
"type": "module",
"dependencies": {
"@cgrd-modules/utils": "*",
"@kobalte/core": "0.13.7"
},
"exports": {
....
"./types": "./src/_lib/types.ts"
},
"imports": {
"~/*": "./src/*"
}
}
And then in the final application i want to augment that type.
declare module "@cgrd-modules/ui/Link/types" {
type LinkOverrideProps = InertiaLinkProps;
}
declare module "@cgrd-modules/ui/Link/types" {
type LinkOverrideProps = InertiaLinkProps;
}
however that gives errors. "TS2664: Invalid module name in augmentation, module @cgrd-modules/ui/Link/types cannot be found." The ui package so far is "Just-In-Time". How do i set this up correctly? Do i have to pre-compile the package and types differently?
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?