
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
@hzzlyxx/ts-docs
Advanced tools
npm install @hzzlyxx/ts-docs --save
// or
yarn add @hzzlyxx/ts-docs
import * as fs from "fs";
import { TsToJson, JsonToMarkdown } from "@hzzlyxx/ts-docs";
const ts2Json = new TsToJson();
const json2Markdown = new JsonToMarkdown();
const json = ts2Json.parse("./type.ts"); // fileName 文件路径
fs.writeFileSync(
path.join(dir, `./index.md`),
json2Markdown.commentToMarkDown(json)
);
// type.ts
/**
* @name Button
* @description 按钮组件
*/
export interface ButtonProps {
/**
* @description Button 类型
*/
htmlType?: "button" | "submit" | "reset";
...
}
{
"Button": {
"description": "按钮组件",
"props": [
{
"name": "htmlType",
"type": "\"button\" | \"submit\" | \"reset\"",
"default": "",
"description": "Button 类型",
"required": false
}
...
]
}
}
属性 | 描述 | 类型 | 默认值 | 必填 |
---|---|---|---|---|
htmlType | Button 类型 | "button" | "submit" | "reset" | - | - |
FAQs
TS接口类型转换为json对象
We found that @hzzlyxx/ts-docs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.