@kravets/asyncapi-types@3.0.2Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Types for AsyncAPI in separate package.
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
76%
Published
9 months ago (3.0.2)
asyncapi-types
Types for AsyncAPI in separate package.
Installation
Install types for v3 version of spec
npm i asyncapi-types@^3 -d
Install types for v2 version of spec
npm i asyncapi-types@^2 -d
Usage
import type { AsyncAPIObject } from "asyncapi-types"; const asyncapi: AsyncAPIObject = { asyncapi: "3.0.0", info: { title: "My API", version: "1.0.0", }, channels: { "my-channel": { messages: { "my-message": { payload: { type: "string" }, }, }, }, }, };
TODO
- Add guide how to use both versions of types in one project
- Improve
bindingstypes based on https://github.com/asyncapi/bindings/blob/master
Thanks
This package is copy-pasted from @asyncapi/parser-js/spec-types with Apache 2.0 license to use only types and not the whole parser.
License
This project is licensed under the Apache 2.0 License.
Built and signed on
GitHub Actions
Add Package
deno add jsr:@kravets/asyncapi-types
Import symbol
import * as asyncapi_types from "@kravets/asyncapi-types";
Import directly with a jsr specifier
import * as asyncapi_types from "jsr:@kravets/asyncapi-types";
Add Package
pnpm i jsr:@kravets/asyncapi-types
pnpm dlx jsr add @kravets/asyncapi-types
Import symbol
import * as asyncapi_types from "@kravets/asyncapi-types";
Add Package
yarn add jsr:@kravets/asyncapi-types
yarn dlx jsr add @kravets/asyncapi-types
Import symbol
import * as asyncapi_types from "@kravets/asyncapi-types";
Add Package
vlt install jsr:@kravets/asyncapi-types
Import symbol
import * as asyncapi_types from "@kravets/asyncapi-types";
Add Package
npx jsr add @kravets/asyncapi-types
Import symbol
import * as asyncapi_types from "@kravets/asyncapi-types";
Add Package
bunx jsr add @kravets/asyncapi-types
Import symbol
import * as asyncapi_types from "@kravets/asyncapi-types";