mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-19 07:01:11 -05:00
Add more type definitions (#882)
* More typing to base.ts * Add more types * More types
This commit is contained in:
@@ -37,7 +37,7 @@ export function ltrim(code: string): string {
|
||||
let _uniqueIdCounter = 0;
|
||||
export function ensureUniqueId(el: HTMLElement) {
|
||||
if (el.id === "")
|
||||
el.id = "py-internal-" + _uniqueIdCounter++;
|
||||
el.id = `py-internal-${_uniqueIdCounter++}`;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -94,7 +94,7 @@ export function inJest(): boolean {
|
||||
return typeof process === 'object' && process.env.JEST_WORKER_ID !== undefined;
|
||||
}
|
||||
|
||||
export function globalExport(name: string, obj: any) {
|
||||
export function globalExport(name: string, obj: object) {
|
||||
// attach the given object to the global object, so that it is globally
|
||||
// visible everywhere. Should be used very sparingly!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user