Aktywne Wpisy

smuteczek2000s +30
Robię brzydką minę, bo już nie chcę trafiać na gorące...
Omińcie ten wpis.
ᕙ(⇀‸↼‶)ᕗ
Omińcie ten wpis.
ᕙ(⇀‸↼‶)ᕗ
źródło: temp_file2014468689743880362
Pobierz
Skopiuj link
Skopiuj link
źródło: temp_file2014468689743880362
Pobierz
Wykop.pl
Chcę z paczką(lub inną), z tego kodu schema wygenerować declare namespace browser.tabsExtra:
[{
"namespace": "tabsExtra",
"functions": [
{
"name": "create",
"type": "function",
"description": "tabs.create extra API.",
"async": true,
"parameters": [
{
"name": "createProperties",
"type": "object",
"optional": true,
"properties": {
"url": { "type": "string" },
"active": { "type": "boolean", "optional": true }
}
}
]
},
{
"name": "update",
"type": "function",
"description": "Update tab extra API.",
"async": true,
"parameters": [
{
"name": "url",
"type": "string"
}
]
}
]
}
]
Uzyskać taki kod:
declare namespace browser.tabsExtra {function create(createProperties: _CreateCreateProperties): Promise;
function update(updateProperties: _UpdateUpdateProperties): Promise;
}
Pomijając typy - chodzi o samo uzyskanie
declare namespace browser.tabsExtra {}i wewnątrz to co jest w schema z namespace tabsExtra.Na razie zwraca mi to:
export interface Browser {[k: string]: unknown;
}
więc całkiem jestem w d. Pomóżcie cokolwiek ruszyć.