Opinionated collection of TypeScript definitions and utilities for Deno and Deno Deploy. With complete types for Deno/NPM/TS config files, constructed from official JSON schemas.

Overview

Schemas

Note: You can also import any type from the default module, ./mod.ts

deno.json

import { type DenoJson } from "https://deno.land/x/[email protected]/deno-json.d.ts";

DenoJson

interface DenoJson {
  $schema: "https://denopkg.com/denoland/deno/cli/schemas/config-file.v1.json";
  compilerOptions: {
    allowJs: boolean;
    allowUnreachableCode: boolean;
    allowUnusedLabels: boolean;
    checkJs: boolean;
    experimentalDecorators: boolean;
    ... 22 more ...;
    suppressImplicitAnyIndexErrors?: boolean;
  };
  importMap: string;
  fmt: DenoJson.Fmt;
  lint: DenoJson.Lint;
  tasks: DenoJson.Tasks;
  test: DenoJson.Test;
}

import_map.json

Type for deno's import_map.json file.

import { type ImportMapJson } from "https://deno.land/x/[email protected]/import-map-json.d.ts";

ImportMapJson

interface ImportMap {
  $schema:
    "https://denopkg.com/denoland/vscode_deno/schemas/import_map.schema.json";
  imports: {
    [specifier: string]: string;
  };
  scopes: {
    [scope: string]: {
      [specifier: string]: string;
    };
  };
}

egg.json (or egg.yaml)

Type for nest.land's egg.json file used by the eggs CLI.

import { type EggJson } from "https://deno.land/x/[email protected]/egg-json.d.ts";

EggJson

interface EggJson {
  $schema: "https://x.nest.land/[email protected]/src/schema.json";
  name: string;
  description: string;
  repository: string;
  homepage: string;
  ... 12 more ...;
  checkTests: boolean | string;
}

package.json

Type for npm's package.json file. Also includes types for fields used by other popular projects, like TypeScript, PNPM, Yarn. Based on the type-fest package.json definition by Sindre Sorhus, with some added support for PNPM.

import { type PackageJson } from "https://deno.land/x/[email protected]/package-json.d.ts";

PackageJson

interface PackageJson {
  name?: string | undefined;
  version?: string | undefined;
  description?: string | undefined;
  keywords?: string[] | undefined;
  homepage?: "." | {} | undefined;
  bugs?: string | {
      url?: string | undefined;
      email?: string | undefined;
  } | undefined;
  ... 44 more ...;
  pnpm?: {
      ...;
  } | undefined;
}

tsconfig.json

Type for TypeScript's tsconfig.json file (TypeScript 3.7).

import { type TsConfigJson } from "https://deno.land/x/[email protected]/tsconfig-json.d.ts";

Note: Taken from the type-fest project by Sindre Sorhus.

TsConfigJson

interface TsConfigJson {
  compilerOptions?: {
      charset?: string | undefined;
      composite?: boolean | undefined;
      declaration?: boolean | undefined;
      declarationDir?: string | undefined;
      diagnostics?: boolean | undefined;
      ... 97 more ...;
      explainFiles?: boolean | undefined;
  } | undefined;
  ... 7 more ...;
  references?: {
      ...;
  }[] | undefined;
}

Contributing

This section assumes you have the GitHub CLI.

Open in GitHub Codespaces

Create a new instance with the GitHub CLI, or just create one from your repository homepage on github.com.

gh codespace create --repo deno911/typedefs

Open in a Gitpod Workspace

Open a new workspace by prepending https://gitpod.io/# to your repository URL and visiting it in your browser:

https://gitpod.io/#https://github.com/deno911/typedefs

Fork and clone the repository locally

gh repo fork deno911/typedefs --clone

Create a new branch for your changes

git checkout -b fix/typo-in-readme

Make small changes and concise commits

# hack hack hack...

git commit README.md -m "fix: typos in README.md" && git push

Note: keep the scope of your changes relevant and concise.

If fixing a bug, create an Issue

Unless, of course, you're fixing a bug for which an issue already exists!

This allows the issue to be connected to your Pull Request, creating a permanent record of your contribution to the project. It also makes it easier for maintainers to track project progression.

Creating an issue also ensures you're given proper credit for fixing that bug ;)

Open a Pull Request

gh pr create --title "fix: typos in README.md"

Or just open your repo on GitHub.com and follow the prompts.

Warning: make sure you select the upstream repo for your PR!



You might also like...

Schemix allows you to programmatically create Prisma schemas using TypeScript ⌨️

Schemix allows you to programmatically create Prisma schemas using TypeScript ⌨️

Schemix Schemix let's you programmatically generate Prisma schemas. As Prisma schemas are not inherently segmentable, Schemix acts as a library to aid

Jan 5, 2023

A highly opinionated and complete starter for Next.js projects ready to production

A highly opinionated and complete starter for Next.js projects ready to production

The aim for this starter is to give you a starting point with everything ready to work and launch to production. Web Vitals with 100% by default. Folder structure ready. Tooling ready. SEO ready. SSR ready.

Nov 27, 2022

JavaScript library for parsing Dirtywave M8 files, complete with a CLI for interacting with M8 files.

m8-js This repository contains a JavaScript library for parsing Dirtywave M8 files, as well as a CLI for interacting with M8 files. The hopes are not

Dec 17, 2022

Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

May 18, 2022

Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

May 3, 2022

Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

Jan 3, 2023

🛣️ A tiny and fast http request router designed for use with deno and deno deploy

Rutt Rutt is a tiny http router designed for use with deno and deno deploy. It is written in about 200 lines of code and is pretty fast, using an exte

Dec 10, 2022

A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

Wren Wren is a small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity. convenient aliases for HTTP responses au

Dec 12, 2022

This is a simple boilerplate for a Deno website, deployed with Deno Deploy.

Simple Deno Website Boilerplate This is a simple website boilerplate built using Deno and deployed using Deno Deploy. Demo at simple-deno-website-boil

Dec 3, 2022
Releases(0.0.1)
Learn GraphQL by building a blogging engine. Create resolvers, write schemas, write queries, design the database, test and also deploy.

GraphQL Blog graphqlblog.com Learn GraphQL by building a blogging engine. Create resolvers, write schemas, write queries, design the database, test an

GraphQLApps 6 Aug 17, 2022
Package fetcher is a bot messenger which gather npm packages by uploading either a json file (package.json) or a picture representing package.json. To continue...

package-fetcher Ce projet contient un boilerplate pour un bot messenger et l'executable Windows ngrok qui va permettre de créer un tunnel https pour c

AILI Fida Aliotti Christino 2 Mar 29, 2022
TSServer plugin & Utilities for "expanding" TypeScript types

ts-expand-type This repo provides a TS Server plugin which amends quick info to include the fully "expanded" type. "Expanded" means that object inters

Max Stoumen 6 Nov 20, 2022
Compile-time tests for types. Useful to make sure types don't regress into being overly-permissive as changes go in over time.

expect-type Compile-time tests for types. Useful to make sure types don't regress into being overly-permissive as changes go in over time. Similar to

Misha Kaletsky 82 Jan 8, 2023
A script that combines a folder of SVG files into a single sprites file and generates type definitions for safe usage.

remix-sprites-example A script that combines a folder of .svg files into a single sprites.svg file and type definitions for safe usage. Technical Over

Nicolas Kleiderer 19 Nov 9, 2022
npm i uuid, npm i nodemon, npm i commander

goit-nodejs-hw-01 Получаем и выводим весь список контактов в виде таблицы (console.table) node index.js --action list Получаем контакт по id node inde

Oksana Banshchykova 3 Jul 5, 2022
Vite plugin to client bundle i18next locales composited from one to many json/yaml files from one to many libraries. Zero config HMR support included.

vite-plugin-i18next-loader yarn add -D vite-plugin-i18next-loader Vite plugin to client bundle i18next locales composited from one to many json/yaml f

AlienFast 4 Nov 30, 2022
TypeScript type definitions for Bun's JavaScript runtime APIs

Bun TypeScript type definitions These are the type definitions for Bun's JavaScript runtime APIs. Installation Install the bun-types npm package: # ya

Oven 73 Dec 16, 2022
Basic types & utilities for Strapi v4 and plugin creators

Strapi v4 - Types & utilities Basic set of types and utilities for Strapi v4 and plugins creators A developers goodie for Strapi Headless CMS which pr

 VirtusLab Open-Source 7 Oct 14, 2022
🎊 A Collection of TypeScript types for the Kirby CMS

kirby-fest A collection of TypeScript types to work with Kirby, mainly in the context of the Kirby Query Language. Setup # pnpm pnpm add -D kirby-fest

Johann Schopplich 5 Nov 22, 2022