From 61a76252b455d5dcad5535e9fef4a5445643d59a Mon Sep 17 00:00:00 2001 From: Davide Iadeluca <146922689+DavideIadeluca@users.noreply.github.com> Date: Wed, 2 Oct 2024 13:13:26 +0200 Subject: [PATCH] [1.x] [extensibility] Add (some) missing shims (#4027) * chore: add some missing shims * chore: remove unused import --- js/src/@types/shims.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 js/src/@types/shims.d.ts diff --git a/js/src/@types/shims.d.ts b/js/src/@types/shims.d.ts new file mode 100644 index 0000000..0f41354 --- /dev/null +++ b/js/src/@types/shims.d.ts @@ -0,0 +1,12 @@ +declare module 'flarum/common/models/Discussion' { + export default interface Discussion { + isApproved(): boolean; + } +} + +declare module 'flarum/common/models/Post' { + export default interface Post { + isApproved(): boolean; + canApprove(): boolean; + } +}