Skip to content

createStore should return Store<any> than Store<unknown> #4878

@compulim

Description

@compulim

Is it an issue related to Adaptive Cards?

No

Is this an accessibility issue?

No

What version of Web Chat are you using?

Development build

Which distribution are you using Web Chat from?

Unrelated

Which hosting environment does this issue primarily affect?

Others or unrelated

Which browsers and platforms do the issue happened?

Others or unrelated

Which area does this issue affect?

Others or unrelated

What is the public URL for the website?

No response

Please describe the bug

Because Web Chat did not full typed the store, returning unknown break existing signature.

We should keep returning it as any.

Do you see any errors in console log?

No response

How to reproduce the issue?

const store = createStore(...);

const { activities }: { activities: WebChatActivity[] } = store;

What do you expect?

TypeScript should not complain that store cannot be { activities: WebChatActivity[] }.

What actually happened?

TypeScript complain that store cannot be { activities: WebChatActivity[] }.

Do you have any screenshots or recordings to repro the issue?

No response

Adaptive Card JSON

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.bugIndicates an unexpected problem or an unintended behavior.customer-reportedRequired for internal Azure reporting. Do not delete.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions