Skip to content

dns-googledns fails strict typecheck in deleteRecord #454

@ifanatics-media

Description

@ifanatics-media

Running the workspace typecheck currently reaches \packages/dns/googledns\ and fails under the repo's strict/noUncheckedIndexedAccess config.\n\nRepro:\n\n\\powershell\ncorepack pnpm --dir packages/dns/googledns typecheck\n\\n\nObserved errors:\n\n\\ ext\npackages/dns/googledns typecheck: src/index.ts(129,62): error TS18048: 'name' is possibly 'undefined'.\npackages/dns/googledns typecheck: src/index.ts(132,18): error TS18048: 'name' is possibly 'undefined'.\npackages/dns/googledns typecheck: src/index.ts(133,17): error TS2532: Object is possibly 'undefined'.\n\\n\nRoot cause: \deleteRecord()\ destructures
ecordId.split('/')\ directly, so TypeScript correctly treats the split pieces as possibly missing. It also reads \existing[0].ttl\ after only a length check, which still needs a narrowed first record with
oUncheckedIndexedAccess. I will open a focused PR that validates the record ID shape and narrows the first matching record before using it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions