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

Type 'T' does not satisfy the constraint 'SignalRef... #8454

Closed
5 tasks done
Maxim-Mazurok opened this issue Oct 9, 2022 · 2 comments
Closed
5 tasks done

Type 'T' does not satisfy the constraint 'SignalRef... #8454

Maxim-Mazurok opened this issue Oct 9, 2022 · 2 comments
Labels

Comments

@Maxim-Mazurok
Copy link

Please:

When running npx tsc --noEmit I'm getting this error:

node_modules/vega-lite/build/src/channeldef.d.ts:63:66 - error TS2344: Type 'T' does not satisfy the constraint 'SignalRef | ExprRef | FieldDef<any, any> | DatumDef<string, SignalRef | DateTime | ExprRef | PrimitiveValue> | ValueDef<...>'.
  Type 'T' is not assignable to type 'DatumDef<string, SignalRef | DateTime | ExprRef | PrimitiveValue>'.

63 export declare function isConditionalParameter<T>(c: Conditional<T>): c is ConditionalParameter<T>;
                                                                    ~

  node_modules/vega-lite/build/src/channeldef.d.ts:63:48
    63 export declare function isConditionalParameter<T>(c: Conditional<T>): c is ConditionalParameter<T>;
                                                      ~
    This type parameter might need an `extends DatumDef<string, SignalRef | DateTime | ExprRef | PrimitiveValue>` constraint.
  node_modules/vega-lite/build/src/channeldef.d.ts:63:48
    63 export declare function isConditionalParameter<T>(c: Conditional<T>): c is ConditionalParameter<T>;
                                                      ~
    This type parameter might need an `extends SignalRef | ExprRef | FieldDef<any, any> | DatumDef<string, SignalRef | DateTime | ExprRef | PrimitiveValue> | ValueDef<...>` constraint.

node_modules/vega-lite/build/src/channeldef.d.ts:63:97 - error TS2344: Type 'T' does not satisfy the constraint 'SignalRef | ExprRef | FieldDef<any, any> | DatumDef<string, SignalRef | DateTime | ExprRef | PrimitiveValue> | ValueDef<...>'.

63 export declare function isConditionalParameter<T>(c: Conditional<T>): c is ConditionalParameter<T>;
                                                                                                   ~

  node_modules/vega-lite/build/src/channeldef.d.ts:63:48
    63 export declare function isConditionalParameter<T>(c: Conditional<T>): c is ConditionalParameter<T>;
                                                      ~
    This type parameter might need an `extends SignalRef | ExprRef | FieldDef<any, any> | DatumDef<string, SignalRef | DateTime | ExprRef | PrimitiveValue> | ValueDef<...>` constraint.


Found 2 errors in the same file, starting at: node_modules/vega-lite/build/src/channeldef.d.ts:63

My tsconfig:

{
  "compilerOptions": {
    "target": "ES2015",
    "moduleResolution": "Node",
    "strict": true,
    "esModuleInterop": true,
    "types": ["jest", "node"],
    "lib": ["ESNext", "DOM"]
  }
}

(notice "strict: true", without it compiles fine)

@domoritz
Copy link
Member

Is this a duplicate of #5477?

@Maxim-Mazurok
Copy link
Author

Maxim-Mazurok commented Oct 10, 2022

Yeah, it seems to compile fine with

"strict": true,
"strictNullChecks": false,

So I guess it is the same issue indeed.

I'm just using "skipLibCheck": true for now as a workaround

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

No branches or pull requests

2 participants