Closed cyfung1031 closed 1 year ago
Note: Although $(document)
$(window)
might be also possible usages for $(...)
, but in such a case, it would not used with array-like methods. (e.g. $(document).ready(...)
)
In such a rare case, the TypeScript users shall do $(document)[0] as any as Document
.
[key: string]: Function;
This seems just incorrect, so I don't think it belongs.
class Cash implements ArrayLike<HTMLElement> {
This is I guess kinda true, except maybe we should use EleLoose
rather than HTMLElement
, but the Cash
class isn't really meant to be exposed to the user, so what benefit would this change get us?
PR closed as the change should be in Interface Cash not class Cash.
And [index: number]: EleLoose | undefined
already exists in types.ts
And Extending Cash shall be preferred as the number index will collide with the string key
resolves #380; resolves #421
[key: string]: Function;
is added toCash
such that #380 can be resolved.ArrayLike<HTMLElement>
is also added such that Cash can be array-like withHTMLElement
results fromquerySelectorAll
.