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.

TS2769: No overload matches this call

See original GitHub issue

按照官方文档引用Popover组件ts报错

`import { Popover } from ‘antd-mobile’

   <Popover
          overlayClassName="city-tip-popover"

          align={{

            offset: [50, 5]
          }}
          placement="bottom"
          overlay={[<span className="tip-content" key={city}>{city}</span>]}
        >
          <i className="tip-icon"></i>
 </Popover>`

TS2769: No overload matches this call. Overload 1 of 2, ‘(props: Readonly<PopOverPropsType>): Popover’, gave the following error. Type ‘{ offset: number[]; }’ is not assignable to type ‘{ overflow: { adjustY: number; adjustX: number; }; }’. Object literal may only specify known properties, and ‘offset’ does not exist in type ‘{ overflow: { adjustY: number; adjustX: number; }; }’. Overload 2 of 2, ‘(props: PopOverPropsType, context?: any): Popover’, gave the following error. Type ‘{ offset: number[]; }’ is not assignable to type ‘{ overflow: { adjustY: number; adjustX: number; }; }’. Object literal may only specify known properties, and ‘offset’ does not exist in type ‘{ overflow: { adjustY: number; adjustX: number; }; }’.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
seven0404commented, Jun 9, 2020

I have the same issue

`import { Toast, PullToRefresh } from ‘antd-mobile’;

    <PullToRefresh
      damping={100}
      indicator={{}}
      direction='down'
      refreshing={this.state.refreshing}
      onRefresh={() => {
        this.setState({ refreshing: true });
        setTimeout(() => {
          this.setState({ refreshing: false });
        }, 1000);
      }}
    >

<div>my Node</div>

    </PullToRefresh> `

No overload matches this call. Overload 1 of 2, ‘(props: Readonly<PropsType>): PullToRefresh’, gave the following error. Type ‘{ children: Element[]; damping: number; indicator: {}; direction: “down”; refreshing: boolean; onRefresh: () => void; }’ is missing the following properties from type ‘Pick<Readonly<PropsType> & Readonly<{ children?: ReactNode; }>, “children” | “style” | “getScrollContainer” | “direction” | “refreshing” | … 5 more … | “scale”>’: getScrollContainer, distanceToRefresh Overload 2 of 2, ‘(props: PropsType, context?: any): PullToRefresh’, gave the following error. Type ‘{ children: Element[]; damping: number; indicator: {}; direction: “down”; refreshing: boolean; onRefresh: () => void; }’ is missing the following properties from type ‘Pick<Readonly<PropsType> & Readonly<{ children?: ReactNode; }>, “children” | “style” | “getScrollContainer” | “direction” | “refreshing” | … 5 more … | “scale”>’: getScrollContainer, distanceToRefresh

0reactions
awmleercommented, Nov 17, 2021

v2 已停止维护了,可以考虑升级一下

Read more comments on GitHub >

github_iconTop Results From Across the Web

No overload matches this call. Type 'string' is not assignable to ...
This sometimes happens when you have passed an incorrect number of arguments to an anonymous function: Object.keys(data).reduce((key: ...
Read more >
TS2769: No overload matches this call. · Issue #3485 - GitHub
Describe the bug. TS2769: No overload matches this call. Overload 1 of 2, '(props: ListItemTitleProps, context?: any): ReactElement<any, ...
Read more >
No overload matches this call error in TypeScript | bobbyhadz
The error "No overload matches this call" occurs when we call a function and pass it a parameter that doesn't match any of...
Read more >
No overload matches this call with styled components ...
No overload matches this call in TypeScript is really annoying and there aren't too many solutions around there, though we have a solution!...
Read more >
How to fix error TS2769 http options no overload matches this ...
This gave me this error in typeScript / Angular: error TS2769: No overload matches this call. Solution. You have to cast httpOptions to...
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