Description:
In index-builder.ts L30:
const targetLoc = entry.loc || (entry as any).url || '';
This silently accepts an undocumented url field on SitemapIndexEntry using as any, bypassing TypeScript. This is an implicit API surface that:
- Is not reflected in the
SitemapIndexEntry type
- Is not documented in README or DOCUMENTATION.md
- Could lead to confusion (should I use
loc or url?)
Recommendation: Either formally support url as an alias in the type (e.g., url?: string) or remove the fallback and enforce strict loc-only usage.
Description:
In
index-builder.tsL30:This silently accepts an undocumented
urlfield onSitemapIndexEntryusingas any, bypassing TypeScript. This is an implicit API surface that:SitemapIndexEntrytypelocorurl?)Recommendation: Either formally support
urlas an alias in the type (e.g.,url?: string) or remove the fallback and enforce strictloc-only usage.