quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

TS7018 error in generated typescript

Open bagley2014 opened this issue 2 years ago • 0 comments

In the generated typescript there's a function m that gives a compiler error.

function m(additional: any) {
    return { props: [], additional };
}

The error is error TS7018: Object literal's property 'props' implicitly has an 'any[]' type.

Someone else may have had a similar issue (#1437) but their post is fairly vague. I created bagley2014/quicktype-bug-repro to make it easy for others to reproduce the error. npm install, npm run quicktype , and npm run build should repro the build error.

bagley2014 avatar Oct 29 '23 05:10 bagley2014