CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 12:46:32 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=76a6fd41d005a7e3e342c7156c08fa82b2cbb0072821bf0ed66004841596ec0fa%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22MbBDlWfG4ow7O6oEUfmFRRcysfo3FKi2%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d6b35ac941c1b3-BLR
//global.d.tstype ConfigMeta = StringConfig | NumberConfigdeclare interfac - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //global.d.ts
- type ConfigMeta = StringConfig | NumberConfig
- declare interface Config<T> {
- name: string
- value: T
- }
- interface StringConfig extends Config<String> {
- type: "string"
- }
- interface NumberConfig extends Config<Number> {
- type: "number"
- }
- interface MetaData {
- name: string,
- config: ConfigMeta[]
- }
- declare function registerPlugin(meta: MetaData, callback: (config: Record<string, any>) => void): void
- //script.ts
- registerPlugin({
- name: "some plugin",
- config: [{
- type: "string",
- name: "foo",
- value: "asdf"
- }, {
- type: "number",
- name: "bar",
- value: 123
- }]
- }, (config) => {
- //the issue here, config is declared as Record<string, any>
- //however is it possible to extract type information from above config input
- //and get the correct key and associated types directly assigned?
- console.log(config) //gives { foo: "asdf", bar: 123 }
- })
Advertisement
Add Comment
Please, Sign In to add comment
-
📝 EASY MONEY GUIDE ✅ Working 5
JavaScript | 1 sec ago | 0.25 KB
-
⭐⭐⭐Exploit 500$ in 15 Minutes⭐⭐
Java | 1 sec ago | 0.10 KB
-
💎 ChangeNOW Exploit
JavaScript | 3 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ F
JavaScript | 3 sec ago | 0.25 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D M⭐⭐
Java | 6 sec ago | 0.10 KB
-
📌 Instant BTC Profit Method ✅ Working V
JavaScript | 10 sec ago | 0.25 KB
-
🚨 Free Crypto Method 🚨
JavaScript | 12 sec ago | 0.24 KB
-
📝 EASY MONEY GUIDE ✅ Working G
JavaScript | 12 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand