mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-10 13:18:25 +00:00
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:
co-authored by
Codex
Eric Fennis
parent
4a21c1617e
commit
81875c8c42
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user