deno publish: linter detect slow types on non-public API if keyof typeof
is used on unexported member
#23646
Labels
working as designed
this is working as intended
Using
keyof typeof
on an unexported member seems to expose it totally as part of public API even though it shouldn'tIn the minimal repro below,
qrcode()
is supposed to be the only function exported. It has explicit typing so the fact thatQrCode.from
is implicit shouldn't matter:It triggers the following errors, which shouldn't happen as
class QrCode
is not exported.Removing
keyof typeof
fixes the issue:Note that it is the only change performed, the unexported member has not been edited and still has its implicit typings so the issue can be narrowed down to
keyof typeof
.Probably the linter mistakenly add it to exposed member when accessed with
keyof typeof
operatorsThe text was updated successfully, but these errors were encountered: