()
| 382 | * Create (or hydrate) an unique UID for the component instance. |
| 383 | */ |
| 384 | export function props_id() { |
| 385 | if ( |
| 386 | hydrating && |
| 387 | hydrate_node && |
| 388 | hydrate_node.nodeType === COMMENT_NODE && |
| 389 | hydrate_node.textContent?.startsWith(`$`) |
| 390 | ) { |
| 391 | const id = hydrate_node.textContent.substring(1); |
| 392 | hydrate_next(); |
| 393 | return id; |
| 394 | } |
| 395 | |
| 396 | // @ts-expect-error This way we ensure the id is unique even across Svelte runtimes |
| 397 | (window.__svelte ??= {}).uid ??= 1; |
| 398 | |
| 399 | // @ts-expect-error |
| 400 | return `c${window.__svelte.uid++}`; |
| 401 | } |
nothing calls this directly
no test coverage detected