Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error With Typescript 2.7 in react-redux-typescript/es5-commonjs/mapped-types.d.ts #53

Closed
sylvanaar opened this issue Feb 1, 2018 · 1 comment

Comments

@sylvanaar
Copy link

sylvanaar commented Feb 1, 2018

(11,92): error TS2344: Type '({ [P in keyof T]: P; } & {} & { [k: string]: never; })[keyof T]' does not satisfy the constraint 'keyof (Pick<T, ({ [P in keyof T]: P; } & { [P in keyof U]: never; } & { [k: string]: never; })[ke...'.
  Type '({ [P in keyof T]: P; } & {})[keyof T]' is not assignable to type 'keyof (Pick<T, ({ [P in keyof T]: P; } & { [P in keyof U]: never; } & { [k: string]: never; })[ke...'.
    Type '{ [P in keyof T]: P; }[keyof T]' is not assignable to type 'keyof (Pick<T, ({ [P in keyof T]: P; } & { [P in keyof U]: never; } & { [k: string]: never; })[ke...'.
      Type 'keyof T' is not assignable to type 'keyof (Pick<T, ({ [P in keyof T]: P; } & { [P in keyof U]: never; } & { [k: string]: never; })[ke...'.
        Type 'keyof T' is not assignable to type 'never'.
          Type '{ [P in keyof T]: P; }[keyof T]' is not assignable to type 'never'.
            Type '({ [P in keyof T]: P; } & {})[keyof T]' is not assignable to type 'never'.
              Type '({ [P in keyof T]: P; } & {} & { [k: string]: never; })[keyof T]' is not assignable to type 'never'.
                Type '({ [P in keyof T]: P; } & {})[keyof T]' is not assignable to type 'never'.
                  Type '{ [P in keyof T]: P; }[keyof T]' is not assignable to type 'never'.
                    Type 'keyof T' is not assignable to type 'never'.

Errors on these lines:

export declare type Overwrite<T extends object, U extends object> = Pick<(Diff<T, U> & U), OmitKeys<keyof T, never>>;
export declare type Assign<T extends object, U extends object> = Pick<(Diff<T, U> & U), OmitKeys<keyof (T & U), never>>;
@piotrwitek
Copy link
Owner

yes it's cascading from here: piotrwitek/utility-types#12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants