8000 Can we strengthen the return type of Record constructor? · Issue #992 · immutable-js/immutable-js · GitHub
[go: up one dir, main page]

Skip to content

Can we strengthen the return type of Record constructor? #992

@volkanunsal

Description

@volkanunsal

I have whole chunks of code that seems to be uncovered by Flow because of this TODO item:

//TODO: Once flow can extend normal Objects we can change this back to actually reflect Record behavior.
// For now fallback to any to not break existing Code
declare class Record<T: Object> {
  static <T: Object>(spec: T, name?: string): /*T & Record<T>*/any;

I'm wondering if anyone knows when Flow will have a fix for this in place, so that we can start type checking Records.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0