Skip to content

Commit 3f3ea49

Browse files
committed
feat: add maxImageUploadSize* fields
1 parent 58f76f2 commit 3f3ea49

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lib/stackexchange.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,13 @@ declare global {
927927
allowRetractingFlags: boolean;
928928
}
929929

930+
interface ImageSettings {
931+
/** Maximum upload size of an animated gif (10 MiB). */
932+
maxImageUploadSizeInBytesAnimatedGif: number;
933+
/** Maximum upload size of an image (2 MiB). */
934+
maxImageUploadSizeInBytes: number;
935+
}
936+
930937
interface IntercomSettings {
931938
appId: string;
932939
hostBaseUrl: string;
@@ -993,6 +1000,8 @@ declare global {
9931000
elections: ElectionsSettings;
9941001
/** Constants related to flags */
9951002
flags: FlagSettings;
1003+
/** Constants related to image sizes */
1004+
image: ImageSettings;
9961005
intercom: IntercomSettings;
9971006
legal: LegalSettings;
9981007
/** Constants related to the markdown parser */

spec/stackexchange.test-d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,8 @@ expectType<StackExchange.AccountSettings>(settings.accounts);
391391

392392
expectType<StackExchange.FlagSettings>(settings.flags);
393393

394+
expectType<number>(StackExchange.settings.image.maxImageUploadSizeInBytes);
395+
394396
expectType<StackExchange.MarkdownSettings>(settings.markdown);
395397

396398
expectType<StackExchange.SiteSettings>(settings.site);

0 commit comments

Comments
 (0)