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.

Flow 0.75.0 reports 'Deprecated $call syntax' error with Axios

See original GitHub issue

Hey there! I’m getting the following error regarding the $call (lowercase c) syntax. I’m not familiar with this syntax and there’s nothing in the flow docs about this. The only mention of it I could find was an old github issue in the flow repo and it wasn’t helpful.

This started happening when I upgraded flow from 0.74.0 to 0.75.0.

  • flow: 0.75.0
  • yarn: 1.7.0
  • typed/npm/axios_v0.18.x.js
> yarn flow
yarn run v1.7.0
$ ./node_modules/.bin/flow status
Error β”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆ flow-typed/npm/axios_v0.18.x.js:102:5

Deprecated $call syntax. Use callable property syntax instead. (deprecated-call-syntax)

      99β”‚   declare type AxiosPromise<T,R = T> = Promise<AxiosXHR<T,R>>;
     100β”‚   declare class Axios {
     101β”‚     constructor<T,R>(config?: AxiosXHRConfigBase<T,R>): void;
     102β”‚     $call: <T,R>(
     103β”‚       config: AxiosXHRConfig<T,R> | string,
     104β”‚       config?: AxiosXHRConfig<T,R>
     105β”‚     ) => AxiosPromise<T,R>;

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:24
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
ryota-murakamicommented, Jun 22, 2018

thanks all!

i’m facing this error too and also even for packages other than axios. so is there a way(i guess .flowconfig setting) to suppress deprecated-call-syntax Error?

it is useful until reflect fix to type definition file.

4reactions
madolecommented, Jun 22, 2018

Getting this with the styled-components flow-typed package.

  declare export default {
    $call: $npm$styledComponents$Call<ComponentListKeys>,
    css: TaggedTemplateLiteral<Array<Interpolation>>,
    ...$npm$styledComponents$StyledComponentsComponentList,
    ...$npm$styledComponents$StyledComponentsNativeComponentList,
  }
[flow] Deprecated $call syntax. Use callable property syntax instead. (`deprecated-call-syntax`)

Can’t find any documentation on what the callable property syntax is

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling Errors With Axios - Stack Abuse
In this article, we will see how to handle errors with Axios, as this is very important when making any HTTP calls knowing...
Read more >
Release notes - n8n Documentation
The editor now includes color signals to indicate when syntax is valid or invalid, and better error messages and tips. Node enhancements#. Facebook...
Read more >
Changelog - Dendron
deprecate (structure): enableHandlerbarTemplates has been removed as a configuration option (because it is now always on). No extra action isΒ ...
Read more >
How to handle 401 (Authentication Error) in axios and react?
I am calling request function from multiple react components and when one of the request fails I want to refresh the token and...
Read more >
How to handle unhandledrejection errors using axios
get call is failing, and e in the catch block is an unhandledrejection error, rather than the error axios encountered. That error is...
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