Skip to content

Bug: AskableContextImpl leaks implementation class in public API #138

@vamgan

Description

@vamgan

packages/core/src/index.ts exports AskableContextImpl alongside createAskableContext(). Consumers who import the class directly can depend on implementation details not covered by the AskableContext interface, making internal refactors into unintended breaking changes.

Current behaviour

// consumers can do this today
import { AskableContextImpl } from '@askable-ui/core';
const ctx = new AskableContextImpl({ maxHistory: 10 });

Expected behaviour

Only createAskableContext() (returning the AskableContext interface) and type exports should be public. The concrete class is an implementation detail.

Fix

Remove the AskableContextImpl named export from packages/core/src/index.ts. The factory function already returns AskableContext, so no consumer using the intended API is affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions