snoowrap icon indicating copy to clipboard operation
snoowrap copied to clipboard

Subreddit missing type declarations for recently added features

Open jamesrswift opened this issue 2 years ago • 0 comments

Been combing through some more code today, and I found that the following properties do not have corresponding type definitions on the subreddit class:

	restrict_posting: boolean;
	free_form_reports: boolean;
	original_content_tag_enabled: boolean;
	allow_galleries: boolean;
	prediction_leaderboard_entry_type: string; // value : 'SUBREDDIT_HEADER' when tested
	allow_predictions: boolean;
	community_reviewed: boolean;
	allow_talks: boolean;
	disable_contributor_requests: boolean;
	should_archive_posts: boolean;
	user_flair_type: string;
	allow_polls: boolean;
	is_crosspostable_subreddit: boolean;
	allow_prediction_contributors: boolean;
	accept_followers: boolean;
	restrict_commenting: boolean;
	mobile_banner_image: string; // value : '' when tested
	allow_predictions_tournament: boolean;

These properties should still be available by default in javascript realms, but their usage in typescript will result in a compiler error unless disabled.

jamesrswift avatar Apr 15 '22 15:04 jamesrswift