Skip to content

mock: AnythingOfType is marked deprecated on pkgsite #1573

@brackendawson

Description

@brackendawson

Description

On pkgsite mock.AnythingOfType is marked as deprecated.

mock.AnythingOfTypeArgument was marked deprecated by #1441. But because AnythingOfType is a factory function for AnythingOfTypeArgument and factory functions are shown nested under the type, this gets deprecated too.

This is problematic because the AnythingOfTypeArgument deprecation notice says to use AnythingOfType.

Running pkgsite locally shows this is fixed if AnythingOfType returns the unexported anythingOfTypeArgument, as it's a type alias that shouldn't be a breaking change.

My VSCode doesn't reflect this:
image

Step To Reproduce

View public docs for mock package on pkgsite

Expected behavior

AnythingOfTypeArgument deprecated, AnythingOfType not.

Actual behavior

Both deprecated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpkg-mockAny issues related to Mock

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions