Skip to content

Commit

Permalink
fix: resolve regression in typing errors (#4097)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideIadeluca authored Oct 26, 2024
1 parent 448f201 commit 391a861
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extensions/approval/js/src/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import 'flarum/common/models/Discussion';
import 'flarum/common/models/Post';

declare module 'flarum/common/models/Discussion' {
export default interface Discussion {
isApproved(): boolean;
Expand Down
4 changes: 4 additions & 0 deletions extensions/flags/js/src/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import 'flarum/common/models/Post';
import 'flarum/forum/ForumApplication';
import 'flarum/forum/components/Post';

import Flag from '../forum/models/Flag';
import FlagListState from '../forum/states/FlagListState';
import Mithril from 'mithril';
Expand Down
2 changes: 2 additions & 0 deletions extensions/likes/js/src/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'flarum/common/models/Post';

import User from 'flarum/common/models/User';

declare module 'flarum/common/models/Post' {
Expand Down
2 changes: 2 additions & 0 deletions extensions/lock/js/src/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'flarum/common/models/Discussion';

declare module 'flarum/common/models/Discussion' {
export default interface Discussion {
isLocked(): boolean;
Expand Down
4 changes: 4 additions & 0 deletions extensions/mentions/js/src/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import 'flarum/forum/ForumApplication';
import 'flarum/common/models/User';
import 'flarum/common/models/Post';

import MentionFormats from '../forum/mentionables/formats/MentionFormats';
import type BasePost from 'flarum/common/models/Post';

Expand Down
2 changes: 2 additions & 0 deletions extensions/nicknames/js/src/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'flarum/common/models/User';

declare module 'flarum/common/models/User' {
export default interface User {
canEditNickname(): boolean;
Expand Down
2 changes: 2 additions & 0 deletions extensions/sticky/js/src/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'flarum/common/models/Discussion';

declare module 'flarum/common/models/Discussion' {
export default interface Discussion {
isSticky(): boolean;
Expand Down
2 changes: 2 additions & 0 deletions extensions/suspend/js/src/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'flarum/common/models/User';

declare module 'flarum/common/models/User' {
export default interface User {
canSuspend(): boolean;
Expand Down
6 changes: 6 additions & 0 deletions extensions/tags/js/src/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import 'flarum/forum/routes';
import 'flarum/common/Application';
import 'flarum/common/models/Discussion';
import 'flarum/forum/components/IndexPage';
import 'flarum/admin/components/PermissionGrid';

import type Tag from '../common/models/Tag';
import type TagListState from '../common/states/TagListState';

Expand Down

0 comments on commit 391a861

Please sign in to comment.