@moonjellydigital/types-wp-core
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Types WP Core

TypeScript declarations for WordPress core that aren't provided by other packages.

Purpose

This package is intended primarily for block theme authors and plugin authors who want to use block patterns or templates. These declarations capture many of the string literals blocks introduced, like default block pattern categories registered by core, so that you can write scripts or tools to validate or generate code.

Installation

npm:

npm install --save-dev @moonjellydigital/types-wp-core

yarn:

yarn add -D @moonjellydigital/types-wp-core

bun:

bun add -D @moonjellydigital/types-wp-core

Usage

To use the types you'll need to import them into into your .ts file:

import type { corePatternCategory } from '@moonjellydigital/types-wp-core';

// Or this equivalent syntax.
import { type corePatternCategory } from '@moonjellydigital/types-wp-core';

Now you can use them to type your implementation code or extend them to make your own types.

License

GPL v3

Readme

Keywords

Package Sidebar

Install

npm i @moonjellydigital/types-wp-core

Weekly Downloads

0

Version

0.1.0

License

GPL-3.0-only

Unpacked Size

41.7 kB

Total Files

4

Last publish

Collaborators

  • moonjellydigital