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.

TypeScript compile errors

See original GitHub issue
src/client/visualizations/line-chart/line-chart.tsx:680:43 - error TS2339: Property 'range' does not exist on type 'Date[] | Linear<number, number>'.
  Property 'range' does not exist on type 'Date[]'.

680     const scaleX = scaleFn.domain(domain).range(range);
                                              ~~~~~

src/common/models/filter/filter.fixtures.ts:17:10 - error TS2724: Module '"./filter"' has no exported member 'FilterJS'. Did you mean 'Filter'?

17 import { FilterJS } from "./filter";
            ~~~~~~~~

  src/common/models/filter/filter.ts:35:14
    35 export class Filter extends Record<FilterValue>(defaultFilter) {
                    ~~~~~~
    'Filter' is declared here.

src/server/utils/settings-store/settings-store.ts:95:16 - error TS2345: Argument of type 'Promise<AppSettings>' is not assignable to parameter of type 'AppSettings | PromiseLike<AppSettings>'.
  Type 'Promise<AppSettings>' is not assignable to type 'PromiseLike<AppSettings>'.
    Types of property 'then' are incompatible.
      Type '<U>(onFulfill?: (value: AppSettings) => IWhenable<U>, onReject?: (error: any) => IWhenable<U>, onProgress?: (progress: any) => any) => Promise<U>' is not assignable to type '<TResult1 = AppSettings, TResult2 = never>(onfulfilled?: (value: AppSettings) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => PromiseLike<TResult1 | TResult2>'.
        Types of parameters 'onReject' and 'onrejected' are incompatible.
          Type 'TResult2 | PromiseLike<TResult2>' is not assignable to type 'TResult1 | PromiseLike<TResult1>'.
            Type 'TResult2' is not assignable to type 'TResult1 | PromiseLike<TResult1>'.
              Type 'TResult2' is not assignable to type 'PromiseLike<TResult1>'.

95       return Q(stateStore.readState()
                  ~~~~~~~~~~~~~~~~~~~~~~
96         .then(stateData => AppSettings.fromJS(JSON.parse(stateData), { visualizations: MANIFESTS }))
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 6 errors.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
adrianmrozcommented, Feb 1, 2019

We support only version specified in package.json - that’s the dependency. All our @types dependencies are also tied with typescript version. If you want to check all files as project to catch files without entry points (like you did with filter.fixtures.ts!) you can use npm run tic -- -p . to compile with correct version of tsc.

0reactions
adrianmrozcommented, Feb 1, 2019

Yes 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript compile error due to typings
I'm using typescript 1.7.5, typings 0.6.9 and angular 2.0.0-beta.0. How can I get rid of the typescript compile error messages Duplicate ...
Read more >
Understanding TypeScript Errors for Beginners
Another common mistake amongst TypeScript beginners is to assume that because there are no compile-time errors there will be no run-time errors.
Read more >
Avoid TypeScript errors in your project by using the TypeScript ...
No more unexpected type errors! ... Avoid TypeScript errors in your project by using the TypeScript compiler.
Read more >
TypeScript tool window | WebStorm Documentation
The TypeScript tool window lists compilation errors in TypeScript code. This list is not affected by changes you make to your code and...
Read more >
Documentation - tsc CLI Options
Flag Type Default ‑‑allowJs boolean false ‑‑allowUmdGlobalAccess boolean false ‑‑allowUnreachableCode boolean
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