@discord/markdown-types 0.1.4 → 0.2.0
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/index.d.ts +19 -15
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type Node<T, V> = {
|
|
|
5
5
|
|
|
6
6
|
export type EmptyNode<T> = { type: T; value?: never };
|
|
7
7
|
|
|
8
|
-
// biome-ignore lint/suspicious/noExplicitAny:
|
|
8
|
+
// biome-ignore lint/suspicious/noExplicitAny: this is explicitly any
|
|
9
9
|
export type AnyNode<T = any, V = any> = Node<T, V> | EmptyNode<T>;
|
|
10
10
|
|
|
11
11
|
// base
|
|
@@ -32,23 +32,27 @@ export type NormalLink = Node<
|
|
|
32
32
|
export type ChannelMentionLink = Node<
|
|
33
33
|
"channel",
|
|
34
34
|
{
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
domain: string;
|
|
36
|
+
guild_id: bigint | "@me";
|
|
37
|
+
channel_id: bigint;
|
|
37
38
|
}
|
|
38
39
|
>;
|
|
39
40
|
export type MessageMentionLink = Node<
|
|
40
41
|
"message",
|
|
41
42
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
domain: string;
|
|
44
|
+
guild_id: bigint | "@me";
|
|
45
|
+
channel_id: bigint;
|
|
46
|
+
message_id: bigint;
|
|
45
47
|
}
|
|
46
48
|
>;
|
|
47
49
|
export type AttachmentMentionLink = Node<
|
|
48
50
|
"attachment",
|
|
49
51
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
domain: string;
|
|
53
|
+
ephemeral: boolean;
|
|
54
|
+
channel_id: bigint;
|
|
55
|
+
attachment_id: bigint;
|
|
52
56
|
name: string;
|
|
53
57
|
}
|
|
54
58
|
>;
|
|
@@ -59,11 +63,11 @@ export type MentionLink = Node<
|
|
|
59
63
|
|
|
60
64
|
export type Link = Node<"link", NormalLink | MentionLink>;
|
|
61
65
|
|
|
62
|
-
export type UserMention = Node<"user",
|
|
63
|
-
export type ChannelMention = Node<"channel",
|
|
64
|
-
export type RoleMention = Node<"role",
|
|
65
|
-
export type GameMention = Node<"game",
|
|
66
|
-
export type CommandMention = Node<"command", { name: string; id:
|
|
66
|
+
export type UserMention = Node<"user", bigint>;
|
|
67
|
+
export type ChannelMention = Node<"channel", bigint>;
|
|
68
|
+
export type RoleMention = Node<"role", bigint>;
|
|
69
|
+
export type GameMention = Node<"game", bigint>;
|
|
70
|
+
export type CommandMention = Node<"command", { name: string; id: bigint }>;
|
|
67
71
|
export type EveryoneMention = EmptyNode<"everyone">;
|
|
68
72
|
export type HereMention = EmptyNode<"here">;
|
|
69
73
|
export type Mention = Node<
|
|
@@ -77,11 +81,11 @@ export type Mention = Node<
|
|
|
77
81
|
| HereMention
|
|
78
82
|
>;
|
|
79
83
|
|
|
80
|
-
export type Timestamp = Node<"timestamp", { value:
|
|
84
|
+
export type Timestamp = Node<"timestamp", { value: bigint; style?: string }>;
|
|
81
85
|
|
|
82
86
|
export type CustomEmoji = Node<
|
|
83
87
|
"custom",
|
|
84
|
-
{ animated: boolean; name: string; id:
|
|
88
|
+
{ animated: boolean; name: string; id: bigint }
|
|
85
89
|
>;
|
|
86
90
|
export type UnicodeEmoji = Node<"unicode", string>;
|
|
87
91
|
export type Emoji = Node<"emoji", CustomEmoji | UnicodeEmoji>;
|