import type { InternalOptions } from "../types.js"; /** * Create a copy of options, omitting `context` and `rootFunc`. * * This is used when compiling nested selectors (e.g. inside `:is`, `:not`, * `:nth-child(… of S)`) so that the parent compilation state doesn't leak. */ export function copyOptions( options: InternalOptions, ): InternalOptions { // Omit context and rootFunc so parent compilation state doesn't leak. const { context: _, rootFunc: __, ...copied } = options; return copied; }