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.

Comparison targets are reversed (regression)

See original GitHub issue

@RyanCavanaugh @weswigham @ahejlsberg Caused by #27697

TypeScript Version: 3.4.0-dev.20190222

Search Terms:

Code

https://github.com/falsandtru/spica/blob/v0.0.237/src/supervisor.legacy.ts#L49

Expected behavior:

pass

Actual behavior:

Argument of type 'this' is not assignable to parameter of type 'Supervisor<string, unknown, unknown, unknown>'.
  Type 'Supervisor<N, P, R, S>' is not assignable to type 'Supervisor<string, unknown, unknown, unknown>'.
    Type 'string' is not assignable to type 'N'.ts(2345)

Assignability checking must be N to string, not reverse.

Playground Link:

Related Issues:

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
falsandtrucommented, Feb 27, 2019

Looks like good except an illegal ! at the second line.

0reactions
jack-williamscommented, Feb 27, 2019

@falsandtru Yep, sorry. What about this?

class Foo<T extends string> {
    private static instance: Foo<string>[];

    cast(_name: ([T] extends [string] ? string : string)) {
        
    }
    
    foobar() {
        Foo.instance.push(this);
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Effect of switching response and explanatory variable in ...
However, geometry suggests (incorrectly) that when we reverse x and y in the regression, we should get the recipocal of the original slope....
Read more >
Reversed inverse regression for the univariate linear ...
As a fundamental solution, we introduce “reversed inverse regression” along ... (or target y values) and confidence levels are identical to those of...
Read more >
REVERSE REGRESSION: A METHOD FOR JOINT ANALYSIS ...
Consider a randomized clinical trial for comparing two treatments with re- spect to relevant clinical outcomes. For a patient in the target population, ......
Read more >
How to Transform Target Variables for Regression in Python
In this tutorial, you will discover how to use the TransformedTargetRegressor to scale and transform target variables for regression using ...
Read more >
Multicollinearity in Regression Analysis: Problems, Detection ...
Comparing Regression Models to Reveal Multicollinearity Effects. We can compare two versions of the same model, one with high multicollinearity and one without ......
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