npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@open-formulieren/types

v1.0.0

Published

Typescript type definitions for Open Forms' Form.io components

Readme

Open Forms types

Run CI build and tests NPM package code style: prettier

Typescript type definitions for Open Forms' Form.io components

Audience

The type definitions are used in internal libraries of Open Forms:

Usage

Install with your favourite package manager:

npm install --save-dev @open-formulieren/types

It's recommended to install the library as dev-dependency as it's only relevant during compilation and in source code.

Specific schemas

We provide schemas for the component types supported in Open Forms. Import them as:

import type {NumberComponentSchema, TextFieldComponentSchema} from '@open-formulieren/types';

// use in your own types:
interface TextfieldComponentProps {
  component: TextFieldComponentSchema;
  value: TextFieldComponentSchema['defaultValue'];
  errors: string[];
}

For types related to a particular component type, you can import them from their respective modules:

import type {MapValue} from '@open-formulieren/types/components/map';

AnyComponentSchema

The type AnyComponentSchema is a union of all supported component schemas. Use it where you can expect any valid Formio component definition.

import type {AnyComponentSchema} from '@open-formulieren/types';

Release flow

Releases are published automatically to the npm package registry by the CI pipeline when a git tag is pushed.

To prepare a release, bump the version number and tag the commit:

npm version minor # or patch or major
git commit -am ":bookmark: Bump to version <newVersion>"
git tag "<newVersion>"
git push origin main --tags

If you have PGP keys set up, you can use them for the git tag operation.

Coding style / guidelines

Code formatting

Code is formatted with prettier. Configure your editor to apply it on save, or ensure npm run format is applied as a pre-commit hook. The CI pipeline checks the formatting and fails the build if there are changes detected.

Exports

Export the public API from src/index.ts. The public API consists of:

  • each supported component type
  • the JSON types
  • other general purpose types that are useful in downstream projects

For highly specific types (e.g. supporting types for a particular component type), library users can import them from their respective modules. These do not need to be exported from the entrypoint.

interface vs. type

A common debate in TS is interface vs type aliases. They're mostly equivalent - the biggest exception is probably that interfaces can be augmented by downstream code. Some may also argue that the code is cleaner.

In this repository, we apply some rules to decide which to use:

  • when the shape of the object exists by itself and is not expected to be further extended, use an interface for the improved readability
  • when the type is a base to be composed into more complex types (e.g. variants of the same component type), use a type, combined with the Prettify helper on the final result for better readability in code editors
  • for component types, always use type for consistency - there are a number of component types/variants that result in unions, and allowing interfaces leads to a mix of types that are harder to read.

Documentation

The documentation is built with TypeDoc - you can use the directives/tags that are available.

We favour docblocks right above each property, rather than using the @property tags that are common in JSDoc. Keep documentation close to the item being documented.

Use documentation for the intent behind the definition and provide context for the developers using the types.