reddit-types_paftermath
v6.5.0
Published
TypeScript type definitions for Reddit API
Readme
Reddit Types
TypeScript type definitions for Reddit API.
Installation
npm install reddit-typesUsage
import { RedditPost, RedditComment } from "reddit-types";
// Example usage
const post: RedditPost = {
id: "123",
title: "Example Post",
author: "user123",
subreddit: "example",
score: 100,
created_utc: Date.now(),
permalink: "/r/example/comments/123/example_post/",
url: "https://example.com",
};
const comment: RedditComment = {
id: "456",
author: "user456",
body: "This is a comment",
score: 10,
created_utc: Date.now(),
permalink: "/r/example/comments/123/example_post/456/",
};Development
- Clone the repository
- Install dependencies:
npm install - Build the package:
npm run build - Publish the package:
npm publish --access publicLicense
ISC
