mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user