Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

@types/bbcode-to-react

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/bbcode-to-react - npm Package Compare versions

Comparing version
0.2.3
to
0.2.4
+45
-35
bbcode-to-react/index.d.ts

@@ -57,28 +57,2 @@ import { ReactNode } from "react";

/**
* An interface for class member in "Tag"
*/
interface TagType {
/**
* Tag name, with type string
*/
name: string;
/**
* The parent of a tag object, with type ReactNode
*/
parent: ReactNode;
/**
* The inner text of a tag object, with type string
*/
text: string;
/**
* A "params" object for inner processing
*/
params: object;
/**
* The children of a tag object, with type ReactNode array
*/
children: ReactNode[];
}
/**
* A class designed for handling bbcode.

@@ -97,23 +71,23 @@ * The Tag class mostly is extended into another customized class,

*/
constructor(renderer: Renderer<T>, settings?: Partial<Omit<TagType, "children">>);
constructor(renderer: Renderer<T>, settings?: Partial<Omit<bbcodeToReact.TagType, "children">>);
/**
* Tag name, with type string
*/
protected name: TagType["name"];
protected name: bbcodeToReact.TagType["name"];
/**
* The parent of a tag object, with type ReactNode
*/
protected parent: TagType["parent"];
protected parent: bbcodeToReact.TagType["parent"];
/**
* The inner text of a tag object, with type string
*/
protected text: TagType["text"];
protected text: bbcodeToReact.TagType["text"];
/**
* A "params" object for inner processing
*/
protected params: TagType["params"];
protected params: bbcodeToReact.TagType["params"];
/**
* The children of a tag object, with type ReactNode array
*/
protected children: TagType["children"];
protected children: bbcodeToReact.TagType["children"];
/**

@@ -191,8 +165,44 @@ * Getter method of the "children" member of the Tag instance

declare namespace bbcodeToReact {
/**
* An interface for class member in "Tag"
*/
interface TagType {
/**
* Tag name, with type string
*/
name: string;
/**
* The parent of a tag object, with type ReactNode
*/
parent: ReactNode;
/**
* The inner text of a tag object, with type string
*/
text: string;
/**
* A "params" object for inner processing
*/
params: object;
/**
* The children of a tag object, with type ReactNode array
*/
children: ReactNode[];
}
type Renderer<optionType = { linkify: boolean }> = InstanceType<typeof Renderer<optionType>>;
type Tag<T = { linkify: boolean }> = InstanceType<typeof Tag<T>>;
type Parser<optionType = { linkify: boolean }> = InstanceType<typeof Parser<optionType>>;
}
/**
* A defualt parser instance to be exported in this library
*/
declare const parser: Parser;
declare const bbcodeToReact: Parser & {
Parser: typeof Parser;
Tag: typeof Tag;
};
export { Parser, Tag };
export default parser;
export = bbcodeToReact;
{
"name": "@types/bbcode-to-react",
"version": "0.2.3",
"version": "0.2.4",
"description": "TypeScript definitions for bbcode-to-react",

@@ -25,4 +25,5 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bbcode-to-react",

},
"typesPublisherContentHash": "6d73c92581a957debda019aebd762bd5319fa25795701ac7ed9be8dbd5ce1fda",
"typeScriptVersion": "4.5"
"peerDependencies": {},
"typesPublisherContentHash": "1730f792187d1a8fa61890f6f38a41e967899b8924f8de15087954ff74621276",
"typeScriptVersion": "5.0"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:04 GMT
* Last updated: Thu, 30 Jan 2025 03:02:37 GMT
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)

@@ -14,0 +14,0 @@