@rilong/grammyjs-conversations-esm 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/out/conversation.d.ts +885 -0
- package/out/conversation.js +832 -0
- package/out/deps.node.d.ts +2 -0
- package/out/deps.node.js +1 -0
- package/out/engine.d.ts +212 -0
- package/out/engine.js +238 -0
- package/out/form.d.ts +530 -0
- package/out/form.js +598 -0
- package/out/menu.d.ts +593 -0
- package/out/menu.js +698 -0
- package/out/mod.d.ts +8 -0
- package/out/mod.js +8 -0
- package/out/nope.d.ts +16 -0
- package/out/nope.js +35 -0
- package/out/plugin.d.ts +678 -0
- package/out/plugin.js +578 -0
- package/out/resolve.d.ts +43 -0
- package/out/resolve.js +21 -0
- package/out/state.d.ts +147 -0
- package/out/state.js +125 -0
- package/out/storage.d.ts +169 -0
- package/out/storage.js +105 -0
- package/package.json +43 -0
package/out/mod.d.ts
ADDED
package/out/mod.js
ADDED
package/out/nope.d.ts
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* Creates an object that throws an error when touched in any way. This includes
|
3
|
+
*
|
4
|
+
* - getting a property
|
5
|
+
* - setting a property
|
6
|
+
* - calling the object
|
7
|
+
* - constructing the object
|
8
|
+
*
|
9
|
+
* and any of the other [object internal
|
10
|
+
* methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods)
|
11
|
+
* in JavaScript.
|
12
|
+
*
|
13
|
+
* @param msg An error message to use
|
14
|
+
* @typeParam The type of object to create
|
15
|
+
*/
|
16
|
+
export declare function youTouchYouDie<T extends object>(msg: string): T;
|
package/out/nope.js
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
/**
|
2
|
+
* Creates an object that throws an error when touched in any way. This includes
|
3
|
+
*
|
4
|
+
* - getting a property
|
5
|
+
* - setting a property
|
6
|
+
* - calling the object
|
7
|
+
* - constructing the object
|
8
|
+
*
|
9
|
+
* and any of the other [object internal
|
10
|
+
* methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods)
|
11
|
+
* in JavaScript.
|
12
|
+
*
|
13
|
+
* @param msg An error message to use
|
14
|
+
* @typeParam The type of object to create
|
15
|
+
*/
|
16
|
+
export function youTouchYouDie(msg) {
|
17
|
+
function nope() {
|
18
|
+
throw new Error(msg);
|
19
|
+
}
|
20
|
+
return new Proxy({}, {
|
21
|
+
apply: nope,
|
22
|
+
construct: nope,
|
23
|
+
defineProperty: nope,
|
24
|
+
deleteProperty: nope,
|
25
|
+
get: nope,
|
26
|
+
getOwnPropertyDescriptor: nope,
|
27
|
+
getPrototypeOf: nope,
|
28
|
+
has: nope,
|
29
|
+
isExtensible: nope,
|
30
|
+
ownKeys: nope,
|
31
|
+
preventExtensions: nope,
|
32
|
+
set: nope,
|
33
|
+
setPrototypeOf: nope,
|
34
|
+
});
|
35
|
+
}
|