Remove pointless integer annotations. #190

This commit is contained in:
Dessalines 2024-04-29 14:57:08 -04:00
parent d53af8c1cc
commit 3bc73ac7b4
32 changed files with 73 additions and 73 deletions

View file

@ -28,7 +28,7 @@ popd
rm src/types/Sensitive.ts
# Change all the bigints to numbers
find src/types -type f -name '*.ts' -exec sed -i 's/bigint/\/* integer *\/ number/g' {} +
find src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} +
node putTypesInIndex.js

View file

@ -35,7 +35,7 @@
"typedoc": "^0.25.8",
"typescript": "^5.3.3"
},
"packageManager": "pnpm@9.0.1+sha256.46d50ee2afecb42b185ebbd662dc7bdd52ef5be56bf035bb615cab81a75345df",
"packageManager": "pnpm@9.0.6+sha256.0624e30eff866cdeb363b15061bdb7fd9425b17bc1bb42c22f5f4efdea21f6b3",
"types": "./dist/index.d.ts",
"lint-staged": {
"*.{ts,tsx,js}": [

View file

@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type ActivityId = /* integer */ number;
export type ActivityId = number;

View file

@ -8,5 +8,5 @@ export interface BanFromCommunity {
ban: boolean;
remove_data?: boolean;
reason?: string;
expires?: /* integer */ number;
expires?: number;
}

View file

@ -6,5 +6,5 @@ export interface BanPerson {
ban: boolean;
remove_data?: boolean;
reason?: string;
expires?: /* integer */ number;
expires?: number;
}

View file

@ -3,9 +3,9 @@ import type { CommentId } from "./CommentId";
export interface CommentAggregates {
comment_id: CommentId;
score: /* integer */ number;
upvotes: /* integer */ number;
downvotes: /* integer */ number;
score: number;
upvotes: number;
downvotes: number;
published: string;
child_count: number;
}

View file

@ -3,13 +3,13 @@ import type { CommunityId } from "./CommunityId";
export interface CommunityAggregates {
community_id: CommunityId;
subscribers: /* integer */ number;
posts: /* integer */ number;
comments: /* integer */ number;
subscribers: number;
posts: number;
comments: number;
published: string;
users_active_day: /* integer */ number;
users_active_week: /* integer */ number;
users_active_month: /* integer */ number;
users_active_half_year: /* integer */ number;
subscribers_local: /* integer */ number;
users_active_day: number;
users_active_week: number;
users_active_month: number;
users_active_half_year: number;
subscribers_local: number;
}

View file

@ -9,8 +9,8 @@ export interface GetComments {
type_?: ListingType;
sort?: CommentSortType;
max_depth?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
community_id?: CommunityId;
community_name?: string;
post_id?: PostId;

View file

@ -8,8 +8,8 @@ import type { PostId } from "./PostId";
export interface GetModlog {
mod_person_id?: PersonId;
community_id?: CommunityId;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
type_?: ModlogActionType;
other_person_id?: PersonId;
post_id?: PostId;

View file

@ -7,8 +7,8 @@ export interface GetPersonDetails {
person_id?: PersonId;
username?: string;
sort?: SortType;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
community_id?: CommunityId;
saved_only?: boolean;
}

View file

@ -3,7 +3,7 @@ import type { CommentSortType } from "./CommentSortType";
export interface GetPersonMentions {
sort?: CommentSortType;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
unread_only?: boolean;
}

View file

@ -7,8 +7,8 @@ import type { SortType } from "./SortType";
export interface GetPosts {
type_?: ListingType;
sort?: SortType;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
community_id?: CommunityId;
community_name?: string;
saved_only?: boolean;

View file

@ -3,7 +3,7 @@ import type { PersonId } from "./PersonId";
export interface GetPrivateMessages {
unread_only?: boolean;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
creator_id?: PersonId;
}

View file

@ -3,7 +3,7 @@ import type { CommentSortType } from "./CommentSortType";
export interface GetReplies {
sort?: CommentSortType;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
unread_only?: boolean;
}

View file

@ -3,7 +3,7 @@ import type { CommunityId } from "./CommunityId";
export interface GetReportCountResponse {
community_id?: CommunityId;
comment_reports: /* integer */ number;
post_reports: /* integer */ number;
private_message_reports?: /* integer */ number;
comment_reports: number;
post_reports: number;
private_message_reports?: number;
}

View file

@ -1,7 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface GetUnreadCountResponse {
replies: /* integer */ number;
mentions: /* integer */ number;
private_messages: /* integer */ number;
replies: number;
mentions: number;
private_messages: number;
}

View file

@ -1,5 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface GetUnreadRegistrationApplicationCountResponse {
registration_applications: /* integer */ number;
registration_applications: number;
}

View file

@ -3,6 +3,6 @@ import type { CommentId } from "./CommentId";
export interface ListCommentLikes {
comment_id: CommentId;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
}

View file

@ -4,8 +4,8 @@ import type { CommunityId } from "./CommunityId";
export interface ListCommentReports {
comment_id?: CommentId;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
unresolved_only?: boolean;
community_id?: CommunityId;
}

View file

@ -6,6 +6,6 @@ export interface ListCommunities {
type_?: ListingType;
sort?: SortType;
show_nsfw?: boolean;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
}

View file

@ -1,6 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface ListMedia {
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
}

View file

@ -3,6 +3,6 @@ import type { PostId } from "./PostId";
export interface ListPostLikes {
post_id: PostId;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
}

View file

@ -3,8 +3,8 @@ import type { CommunityId } from "./CommunityId";
import type { PostId } from "./PostId";
export interface ListPostReports {
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
unresolved_only?: boolean;
community_id?: CommunityId;
post_id?: PostId;

View file

@ -1,7 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface ListPrivateMessageReports {
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
unresolved_only?: boolean;
}

View file

@ -2,6 +2,6 @@
export interface ListRegistrationApplications {
unread_only?: boolean;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
}

View file

@ -10,7 +10,7 @@ export interface ModlogListParams {
other_person_id?: PersonId;
post_id?: PostId;
comment_id?: CommentId;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
hide_modlog_names: boolean;
}

View file

@ -3,6 +3,6 @@ import type { PersonId } from "./PersonId";
export interface PersonAggregates {
person_id: PersonId;
post_count: /* integer */ number;
comment_count: /* integer */ number;
post_count: number;
comment_count: number;
}

View file

@ -3,10 +3,10 @@ import type { PostId } from "./PostId";
export interface PostAggregates {
post_id: PostId;
comments: /* integer */ number;
score: /* integer */ number;
upvotes: /* integer */ number;
downvotes: /* integer */ number;
comments: number;
score: number;
upvotes: number;
downvotes: number;
published: string;
newest_comment_time: string;
}

View file

@ -21,7 +21,7 @@ export interface PostReportView {
hidden: boolean;
creator_blocked: boolean;
my_vote?: number;
unread_comments: /* integer */ number;
unread_comments: number;
counts: PostAggregates;
resolver?: Person;
}

View file

@ -20,5 +20,5 @@ export interface PostView {
hidden: boolean;
creator_blocked: boolean;
my_vote?: number;
unread_comments: /* integer */ number;
unread_comments: number;
}

View file

@ -13,6 +13,6 @@ export interface Search {
type_?: SearchType;
sort?: SortType;
listing_type?: ListingType;
page?: /* integer */ number;
limit?: /* integer */ number;
page?: number;
limit?: number;
}

View file

@ -3,12 +3,12 @@ import type { SiteId } from "./SiteId";
export interface SiteAggregates {
site_id: SiteId;
users: /* integer */ number;
posts: /* integer */ number;
comments: /* integer */ number;
communities: /* integer */ number;
users_active_day: /* integer */ number;
users_active_week: /* integer */ number;
users_active_month: /* integer */ number;
users_active_half_year: /* integer */ number;
users: number;
posts: number;
comments: number;
communities: number;
users_active_day: number;
users_active_week: number;
users_active_month: number;
users_active_half_year: number;
}