fix(astro): support stricter optional property checking (#5070)
Omit absent className values when calling the shared icon builder so shipped Astro source passes exactOptionalPropertyTypes without changing rendered classes. Enable exactOptionalPropertyTypes and noUncheckedIndexedAccess in the package tsconfig so the existing CI typecheck catches regressions. Background: https://github.com/withastro/astro/issues/18471 Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
This commit is contained in:
parent
4a21c1617e
commit
81875c8c42
2 changed files with 3 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ const [, builtIconAttributes, builtIconNode = []] = buildLucideIconNode(icon, {
|
|||
strokeWidth,
|
||||
absoluteStrokeWidth,
|
||||
nonScalingStroke,
|
||||
className,
|
||||
...(className !== undefined && { className }),
|
||||
hasA11yProp: hasA11yProp(rest),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"useDefineForClassFields": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue