material-components / material-components-web

Modular and customizable Material Design UI components for the web
https://material.io/develop/web
MIT License
17.14k stars 2.15k forks source link

[mdc-auto-init] Missing declaration for function with second optional argument #5188

Open austinw-fineart opened 4 years ago

austinw-fineart commented 4 years ago

Bug report

Calling autoInit() multiple times https://material.io/develop/web/components/auto-init/ mdc-auto-init does not declare a function that takes the second optional argument used to call autoInit() multiple times without logging a warning.

Steps to reproduce

mdc.autoInit(/* root */ document, () => {});

Actual behavior

error TS2554: Expected 0-1 arguments, but got 2.

Your Environment:

Software Version(s)
MDC Web 3.2.0
Browser Chrome 77.0.3865.120
Operating System Windows 10 (1903)
abhiomkar commented 4 years ago

Calling autoInit() multiple times section seems to be outdated. Please follow: Calling subsequent mdc.autoInit() instead.

Thanks!