Typescript error on npm run build but type does exist
Unanswered
Horned oak gall posted this in #help-forum
Horned oak gallOP
When trying to run npm run build I am getting "Property 'eventName' does not exist on type 'Event'." The field does exist on Event though and even the codes auto-finish feature picks it up so not sure on the issue here.
type Props = {
promise: Promise<Event[]>
}
export default async function FragSwapPanel({ promise }: Props) {
const fragSwaps = await promise;
const content = fragSwaps.map((event) => {
return (
<p className="text-xl font-bold">{event.eventName}</p>9 Replies
Horned oak gallOP
^no red squiggles
Error log on running build:
@!=tgt `Event` is shadowing a native TS type
Horned oak gallOP
Urgh, any way to ignore the native ts type instead and prioritize my version?
@Horned oak gall Urgh, any way to ignore the native ts type instead and prioritize my version?
remove dom/dom.iterable from the
lib in tsconfig.json but then that messes up types for wellthe dom
i would js rename the type