chore: migrate src/JSHandle to TS (#5703)

* chore: migrate src/JSHandle to TS

There's a few TODOs in here that all depend on typing the
`ExecutionContext.evaluateHandle` properly so that you can properly
declare what types you're expecting back. Once I've done that file (it's
next on my list) I will loop back and improve the types here, fixing
these TODOs.

* Fix doclint for {}
This commit is contained in:
Jack Franklin
2020-04-21 12:11:06 +01:00
committed by GitHub
parent 42893d8755
commit 8d5d76ed70
8 changed files with 131 additions and 207 deletions

View File

@@ -152,7 +152,7 @@ function checkSources(sources) {
*/
function serializeType(type, circular = []) {
let typeName = checker.typeToString(type);
if (typeName === 'any' || typeName === '{ [x: string]: string; }')
if (typeName === 'any' || typeName === '{ [x: string]: string; }' || typeName === '{}')
typeName = 'Object';
const nextCircular = [typeName].concat(circular);