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

@a0dev/types

v0.1.6

Published

Shared TypeScript types for A0 projects

Readme

@a0dev/types

⚠️ Beta Release - This package is currently in beta. The API may change in future releases.

Shared TypeScript types for A0 projects.

Installation

npm install @a0dev/types
# or
yarn add @a0dev/types

# Install specific beta version
yarn add @a0dev/[email protected]

Usage

Direct Imports (Recommended)

Import types and constants directly from the config module:

import {
  CONFIG_FILES,
  BuildYamlSchema,
  type ProjectConfigData,
  type BuildYamlConfig,
  type ConfigFilesRecord,
  type ConfigEnvironment,
} from "@a0dev/types/config";

// Use constants
const files = CONFIG_FILES; // ["build.yaml"]

// Use schemas for validation
const validatedConfig = BuildYamlSchema.parse(someData);

// Use types
function processConfig(config: BuildYamlConfig) {
  // ...
}

function saveConfig(files: ConfigFilesRecord, env: ConfigEnvironment) {
  // ...
}

Namespace Import (Alternative)

Import everything as a namespace if you prefer:

import * as Config from "@a0dev/types/config";

// Use constants
const files = Config.CONFIG_FILES;

// Use schemas
const validated = Config.BuildYamlSchema.parse(data);

// Use types
type MyConfig = Config.BuildYamlConfig;
type Env = Config.ConfigEnvironment;

Re-exported from Index

All types are also re-exported from the main entry point:

import { Config, type ProjectConfigData } from "@a0dev/types";

// Config namespace is available
const files = Config.CONFIG_FILES;

API Reference

Constants

  • CONFIG_FILES - Array of supported config file names: ["build.yaml"]

Types

  • ConfigFileName - Union of supported config file names
  • ConfigFile - Single configuration file representation
    interface ConfigFile {
      fileName: string;
      content: string;
    }
  • ConfigEnvironment - Environment types: "dev" | "prod"
  • ConfigFilesRecord - Record mapping config file names to YAML strings
  • BuildYamlConfig - TypeScript type for build.yaml configuration
  • ParsedConfigData - Parsed config data structure
  • ProjectConfigData - Alias for ParsedConfigData, represents fully parsed project configuration

Schemas

  • BuildYamlSchema - Zod schema for build.yaml validation

Examples

Validate Build Configuration

import { BuildYamlSchema, type BuildYamlConfig } from "@a0dev/types/config";

const userConfig = {
  general: { disableTracking: true },
  ios: { versionName: "1.0.0", supportsTablet: false },
  android: { versionName: "1.0.0", versionCode: 1 },
};

// Validate and get typed result
const validConfig: BuildYamlConfig = BuildYamlSchema.parse(userConfig);

Type-Safe Config Function

import type { ProjectConfigData, ConfigEnvironment } from "@a0dev/types/config";

async function updateProjectConfig(
  projectId: string,
  config: ProjectConfigData,
  env: ConfigEnvironment,
): Promise<void> {
  // Implementation
}

Iterate Over Config Files

import { CONFIG_FILES, type ConfigFileName } from "@a0dev/types/config";

CONFIG_FILES.forEach((fileName: ConfigFileName) => {
  console.log(`Processing ${fileName}`);
});

License

MIT