question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

c:\Users\camer\fs\ts2fable\node_modules@types\react\index.d.ts

    interface Validator<T> {
        (object: T, key: string, componentName: string, ...rest: any[]): Error | null;
    }

0.1.23 is mapping it as:

and [<AllowNullLiteral>] ValidationMap<'T> =
    obj

0.2.0 develop is mapping it as 😃

    type ValidationMap<'T> =
        TODO

How should it be mapped? This is SyntaxKind.MappedType is TypeScript. cc @alfonsogarciacaro

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ctaggartcommented, Nov 10, 2017

I think this was fixed for 0.2.0 final.

0reactions
humheicommented, Mar 16, 2018

They are different issues 😳 I will open a new issue Current react version 's ValidationMap

type ValidationMap<T> = {[K in keyof T]?: Validator<T> };

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Mapped Types
Generating types by re-using an existing type. ... In TypeScript 4.1 and onwards, you can re-map keys in mapped types with an as...
Read more >
Mastering TypeScript mapped types
In this post, we'll cover mapped types in TypeScript, a real-world example of them, and utility types including Partial, Readonly, and Pick.
Read more >
Mapped Types
Mapped types are a feature in TypeScript which allow you to map over a union of types to create a new type. The...
Read more >
Defining multiple mapped types in typescript?
Typescript syntax for mapped types doesn't allow multiple mappings. There are two ways you can achieve what you want: You can use a...
Read more >
Use TypeScript Mapped Types Like a Pro
The answer is that you can use mapped types, which are generic types that can be used to map the original object type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found