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; + } +}