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

Overview

expect-type

CI npm

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 Jest's expect, but with type-awareness. Gives you access to a number of type-matchers that let you make assertions about the form of a reference or generic type parameter.

import {foo, bar} from '../foo'
import {expectTypeOf} from 'expect-type'

test('foo types', () => {
  // make sure `foo` has type {a: number}
  expectTypeOf(foo).toMatchTypeOf<{a: number}>()

  // make sure `bar` is a function taking a string:
  expectTypeOf(bar).parameter(0).toBeString()
  expectTypeOf(bar).returns.not.toBeAny()
})

It can be used in your existing test files - or any other type-checked file you'd like - it's built into existing tooling with no dependencies. No extra build step, cli tool, IDE extension, or lint plugin is needed. Just import the function and start writing tests. Failures will be at compile time - they'll appear in your IDE and when you run tsc.

See below for lots more examples.

Contents

Installation and usage

npm install expect-type
import {expectTypeOf} from 'expect-type'

Documentation

The expectTypeOf method takes a single argument, or a generic parameter. Neither it, nor the functions chained off its return value, have any meaningful runtime behaviour. The assertions you write will be compile-time errors if they don't hold true.

Features

Check an object's type with .toEqualTypeOf:

expectTypeOf({a: 1}).toEqualTypeOf<{a: number}>()

.toEqualTypeOf can check that two concrete objects have equivalent types:

expectTypeOf({a: 1}).toEqualTypeOf({a: 1})

.toEqualTypeOf succeeds for objects with different values, but the same type:

expectTypeOf({a: 1}).toEqualTypeOf({a: 2})

.toEqualTypeOf fails on extra properties:

// @ts-expect-error
expectTypeOf({a: 1, b: 1}).toEqualTypeOf<{a: number}>()

To allow for extra properties, use .toMatchTypeOf. This checks that an object "matches" a type. This is similar to jest's .toMatchObject:

expectTypeOf({a: 1, b: 1}).toMatchTypeOf({a: 1})

Another example of the difference between .toMatchTypeOf and .toEqualTypeOf, using generics. .toMatchTypeOf can be used for "is-a" relationships:

type Fruit = {type: 'Fruit'; edible: boolean}
type Apple = {type: 'Fruit'; name: 'Apple'; edible: true}

expectTypeOf<Apple>().toMatchTypeOf<Fruit>()

// @ts-expect-error
expectTypeOf<Fruit>().toMatchTypeOf<Apple>()

// @ts-expect-error
expectTypeOf<Apple>().toEqualTypeOf<Fruit>()

Assertions can be inverted with .not:

expectTypeOf({a: 1}).not.toMatchTypeOf({b: 1})

.not can be easier than relying on // @ts-expect-error:

type Fruit = {type: 'Fruit'; edible: boolean}
type Apple = {type: 'Fruit'; name: 'Apple'; edible: true}

expectTypeOf<Apple>().toMatchTypeOf<Fruit>()

expectTypeOf<Fruit>().not.toMatchTypeOf<Apple>()
expectTypeOf<Apple>().not.toEqualTypeOf<Fruit>()

Catch any/unknown/never types:

expectTypeOf<unknown>().toBeUnknown()
expectTypeOf<any>().toBeAny()
expectTypeOf<never>().toBeNever()

// @ts-expect-error
expectTypeOf<never>().toBeNumber()

.toEqualTypeOf distinguishes between deeply-nested any and unknown properties:

expectTypeOf<{deeply: {nested: any}}>().not.toEqualTypeOf<{deeply: {nested: unknown}}>()

Test for basic javascript types:

expectTypeOf(() => 1).toBeFunction()
expectTypeOf({}).toBeObject()
expectTypeOf([]).toBeArray()
expectTypeOf('').toBeString()
expectTypeOf(1).toBeNumber()
expectTypeOf(true).toBeBoolean()
expectTypeOf(() => {}).returns.toBeVoid()
expectTypeOf(Promise.resolve(123)).resolves.toBeNumber()
expectTypeOf(Symbol(1)).toBeSymbol()

Nullable types:

expectTypeOf(undefined).toBeUndefined()
expectTypeOf(undefined).toBeNullable()
expectTypeOf(undefined).not.toBeNull()

expectTypeOf(null).toBeNull()
expectTypeOf(null).toBeNullable()
expectTypeOf(null).not.toBeUndefined()

expectTypeOf<1 | undefined>().toBeNullable()
expectTypeOf<1 | null>().toBeNullable()
expectTypeOf<1 | undefined | null>().toBeNullable()

More .not examples:

expectTypeOf(1).not.toBeUnknown()
expectTypeOf(1).not.toBeAny()
expectTypeOf(1).not.toBeNever()
expectTypeOf(1).not.toBeNull()
expectTypeOf(1).not.toBeUndefined()
expectTypeOf(1).not.toBeNullable()

Use .extract and .exclude to narrow down complex union types:

type ResponsiveProp<T> = T | T[] | {xs?: T; sm?: T; md?: T}
const getResponsiveProp = <T>(_props: T): ResponsiveProp<T> => ({})
type CSSProperties = {margin?: string; padding?: string}

const cssProperties: CSSProperties = {margin: '1px', padding: '2px'}

expectTypeOf(getResponsiveProp(cssProperties))
  .exclude<unknown[]>()
  .exclude<{xs?: unknown}>()
  .toEqualTypeOf<CSSProperties>()

expectTypeOf(getResponsiveProp(cssProperties))
  .extract<unknown[]>()
  .toEqualTypeOf<CSSProperties[]>()

expectTypeOf(getResponsiveProp(cssProperties))
  .extract<{xs?: any}>()
  .toEqualTypeOf<{xs?: CSSProperties; sm?: CSSProperties; md?: CSSProperties}>()

expectTypeOf<ResponsiveProp<number>>().exclude<number | number[]>().toHaveProperty('sm')
expectTypeOf<ResponsiveProp<number>>().exclude<number | number[]>().not.toHaveProperty('xxl')

.extract and .exclude return never if no types remain after exclusion:

type Person = {name: string; age: number}
type Customer = Person & {customerId: string}
type Employee = Person & {employeeId: string}

expectTypeOf<Customer | Employee>().extract<{foo: string}>().toBeNever()
expectTypeOf<Customer | Employee>().exclude<{name: string}>().toBeNever()

Make assertions about object properties:

const obj = {a: 1, b: ''}

// check that properties exist (or don't) with `.toHaveProperty`
expectTypeOf(obj).toHaveProperty('a')
expectTypeOf(obj).not.toHaveProperty('c')

// check types of properties
expectTypeOf(obj).toHaveProperty('a').toBeNumber()
expectTypeOf(obj).toHaveProperty('b').toBeString()
expectTypeOf(obj).toHaveProperty('a').not.toBeString()

.toEqualTypeOf can be used to distinguish between functions:

type NoParam = () => void
type HasParam = (s: string) => void

expectTypeOf<NoParam>().not.toEqualTypeOf<HasParam>()

But often it's preferable to use .parameters or .returns for more specific function assertions:

type NoParam = () => void
type HasParam = (s: string) => void

expectTypeOf<NoParam>().parameters.toEqualTypeOf<[]>()
expectTypeOf<NoParam>().returns.toBeVoid()

expectTypeOf<HasParam>().parameters.toEqualTypeOf<[string]>()
expectTypeOf<HasParam>().returns.toBeVoid()

More examples of ways to work with functions - parameters using .parameter(n) or .parameters, and return values using .returns:

const f = (a: number) => [a, a]

expectTypeOf(f).toBeFunction()

expectTypeOf(f).toBeCallableWith(1)
expectTypeOf(f).not.toBeAny()
expectTypeOf(f).returns.not.toBeAny()
expectTypeOf(f).returns.toEqualTypeOf([1, 2])
expectTypeOf(f).returns.toEqualTypeOf([1, 2, 3])
expectTypeOf(f).parameter(0).not.toEqualTypeOf('1')
expectTypeOf(f).parameter(0).toEqualTypeOf(1)
expectTypeOf(1).parameter(0).toBeNever()

const twoArgFunc = (a: number, b: string) => ({a, b})

expectTypeOf(twoArgFunc).parameters.toEqualTypeOf<[number, string]>()

You can also check type guards & type assertions:

const assertNumber = (v: any): asserts v is number => {
  if (typeof v !== 'number') {
    throw new TypeError('Nope !')
  }
}

expectTypeOf(assertNumber).asserts.toBeNumber()

const isString = (v: any): v is string => typeof v === 'string'
expectTypeOf(isString).guards.toBeString()

Assert on constructor parameters:

expectTypeOf(Date).toBeConstructibleWith('1970')
expectTypeOf(Date).toBeConstructibleWith(0)
expectTypeOf(Date).toBeConstructibleWith(new Date())
expectTypeOf(Date).toBeConstructibleWith()

expectTypeOf(Date).constructorParameters.toEqualTypeOf<[] | [string | number | Date]>()

Class instance types:

expectTypeOf(Date).instance.toHaveProperty('toISOString')

Promise resolution types can be checked with .resolves:

const asyncFunc = async () => 123

expectTypeOf(asyncFunc).returns.resolves.toBeNumber()

Array items can be checked with .items:

expectTypeOf([1, 2, 3]).items.toBeNumber()
expectTypeOf([1, 2, 3]).items.not.toBeString()

Check that functions never return:

const thrower = () => {
  throw new Error('oh no')
}

expectTypeOf(thrower).returns.toBeNever()

Generics can be used rather than references:

expectTypeOf<{a: string}>().not.toEqualTypeOf<{a: number}>()

Distinguish between missing/null/optional properties:

expectTypeOf<{a?: number}>().not.toEqualTypeOf<{}>()
expectTypeOf<{a?: number}>().not.toEqualTypeOf<{a: number}>()
expectTypeOf<{a?: number}>().not.toEqualTypeOf<{a: number | undefined}>()
expectTypeOf<{a?: number | null}>().not.toEqualTypeOf<{a: number | null}>()
expectTypeOf<{a: {b?: number}}>().not.toEqualTypeOf<{a: {}}>()

Detect the difference between regular and readonly properties:

type A1 = {readonly a: string; b: string}
type E1 = {a: string; b: string}

expectTypeOf<A1>().toMatchTypeOf<E1>()
expectTypeOf<A1>().not.toEqualTypeOf<E1>()

type A2 = {a: string; b: {readonly c: string}}
type E2 = {a: string; b: {c: string}}

expectTypeOf<A2>().toMatchTypeOf<E2>()
expectTypeOf<A2>().not.toEqualTypeOf<E2>()

Distinguish between classes with different constructors:

class A {
  value: number
  constructor(a: 1) {
    this.value = a
  }
}
class B {
  value: number
  constructor(b: 2) {
    this.value = b
  }
}

expectTypeOf<typeof A>().not.toEqualTypeOf<typeof B>()

class C {
  value: number
  constructor(c: 1) {
    this.value = c
  }
}

expectTypeOf<typeof A>().toEqualTypeOf<typeof C>()

Within test frameworks

Jest & eslint-plugin-jest

If you're using Jest along with eslint-plugin-jest, you will get warnings from the jest/expect-expect rule, complaining that "Test has no assertions" for tests that only use expectTypeOf().

To remove this warning, configure the ESlint rule to consider expectTypeOf as an assertion:

"rules": {
  // ...
  "jest/expect-expect": [
    "warn",
    {
      "assertFunctionNames": [
        "expect", "expectTypeOf"
      ]
    }
  ],
  // ...
}

Similar projects

Other projects with similar goals:

  • tsd is a CLI that runs the TypeScript type checker over assertions
  • ts-expect exports several generic helper types to perform type assertions
  • dtslint does type checks via comment directives and tslint
  • type-plus comes with various type and runtime TypeScript assertions
  • static-type-assert type assertion functions

Comparison

The key differences in this project are:

  • a fluent, jest-inspired API, making the difference between actual and expected clear. This is helpful with complex types and assertions.
  • inverting assertions intuitively and easily via expectTypeOf(...).not
  • checks generics properly and strictly (tsd doesn't)
  • first-class support for:
    • any (as well as unknown and never) (see issues outstanding at time of writing in tsd for never and any).
      • This can be especially useful in combination with not, to protect against functions returning too-permissive types. For example, const parseFile = (filename: string) => JSON.parse(readFileSync(filename).toString()) returns any, which could lead to errors. After giving it a proper return-type, you can add a test for this with expect(parseFile).returns.not.toBeAny()
    • object properties
    • function parameters
    • function return values
    • constructor parameters
    • class instances
    • array item values
    • nullable types
  • assertions on types "matching" rather than exact type equality, for "is-a" relationships e.g. expectTypeOf(square).toMatchTypeOf<Shape>()
  • built into existing tooling. No extra build step, cli tool, IDE extension, or lint plugin is needed. Just import the function and start writing tests. Failures will be at compile time - they'll appear in your IDE and when you run tsc.
  • small implementation with no dependencies. <200 lines of code - take a look! (tsd, for comparison, is 2.6MB because it ships a patched version of typescript).
Comments
  • Update Extends to not distribute over union types

    Update Extends to not distribute over union types

    Was attempting to use expectTypeOf with unioned types and I was surprised that expectTypeOf was always mismatching.

    See this repro showcasing the problems of union types that get stuck in Extends.

    Note: This only impacts the LHS of the extends.

    opened by trevorade 14
  • Update DeepBrand to improve type checking capabilities

    Update DeepBrand to improve type checking capabilities

    Makes DeepBrand more comprehensive to cover more cases. See the updated usage.test.ts test cases to get an idea of what is supported now.

    Most things in TypeScript can have properties attached to them. There are also some things that DeepBrand can only check for by just directly including value: T such as private properties on classes.

    opened by trevorade 7
  • Thank you for making this library

    Thank you for making this library

    Hello,

    This is not an issue, I just wanted to thank you for making this library. I learned many things by reading the source code. In particular I liked the DeepBrand type.

    I was using the following simple custom types to unit test types

    export type Is<T extends true> = T
    export type Equal<X, Y> = Exclude<X, Y> | Exclude<Y, X> extends never ? true : false
    
    // To test that two types A and B are equal, I do
    type Test = Is<Equal<A, B>>
    

    As you see, this works for simple cases, but will fail to check optional properties for example ...

    I will be using this library instead :)

    Feel free to close this issue once you read it ;)

    opened by webNeat 1
  • [expect-type] `this` param ignored in `.toEqualTypeOf`

    [expect-type] `this` param ignored in `.toEqualTypeOf`

    Repro:

    import { expectTypeOf } from 'expect-type'
    
    type NoThisParam = (a: number) => void
    type DateThisParam = (this: Date, a: number) => void
    type UndefinedThisParam = (this: undefined, a: number) => void
    type UnknownThisParam = (this: unknown, a: number) => void
    type AnyThisParam = (this: any, a: number) => void
    
    // `NoThisParam` and `UnknownThisParam` are the only ones that should be considered equivalent.
    
    expectTypeOf<NoThisParam>().toEqualTypeOf<NoThisParam>();
    expectTypeOf<NoThisParam>().not.toEqualTypeOf<DateThisParam>(); // Fails!
    expectTypeOf<NoThisParam>().not.toEqualTypeOf<UndefinedThisParam>(); // Fails!
    expectTypeOf<NoThisParam>().toEqualTypeOf<UnknownThisParam>();
    expectTypeOf<NoThisParam>().not.toEqualTypeOf<AnyThisParam>(); // Fails!
    

    Playground

    opened by papb 0
  • Rewrite `Equal` to use the equality check from `ReadonlyEquivalent` exclusively

    Rewrite `Equal` to use the equality check from `ReadonlyEquivalent` exclusively

    Note: I extracted a very small part of this PR to https://github.com/mmkal/expect-type/pull/20

    This is a breaking change as I opted to remove the types that were no longer needed. They are exported though so it's likely some people depend on them. I can add these back as desired.

    This took a lot of tinkering. This topic and this equality check is discussed extensively at https://github.com/Microsoft/TypeScript/issues/27024

    The main three edge-cases this implementation worked around are:

    1. Explicitly handling any separately
    2. Supporting identity unions
    3. Supporting identity intersections

    The only remaining known issue with this implementation is:

      // @ts-expect-error This is the bug.
      expectTypeOf<{foo: number} & {bar: string}>().toEqualTypeOf<{foo: number; bar: string}>()
    

    @shicks and I could not find a tweak to the Equality check to make this work.

    Instead, I added a workaround in the shape of a new .simplified modifier that works similar to .not:

      // The workaround is the new optional .simplified modifier.
      expectTypeOf<{foo: number} & {bar: string}>().simplified.toEqualTypeOf<{foo: number; bar: string}>()
    

    I'm not entirely sure what to do with documenting .simplified because it's something you should never use unless you need it. The simplify operation tends to lose information about the types being tested (e.g., functions become {} and classes lose their constructors). I'll definitely update this PR to reference the .simplified modifier but I wanted to get a review on this approach first. One option would be to keep around all the DeepBrand stuff and to have .deepBranded or something being the modifier instead. That would have the benefit of preserving all the exported types making this less of a breaking change.

    opened by trevorade 18
  • Unreadable error messages

    Unreadable error messages

    I introduced this package some weeks ago in the storybook monorepo and I love it.

    However I get complains that the error messages are unreadable:

    843F203A-565E-4401-8790-2BC41A429AFA

    Which I agree on, but I learned myself some tricks to debug that. I do something like this:

    expectTypeOf(meta).toEqualTypeOf<
      ComponentAnnotations<
        VueFramework,
        {
          readonly disabled: boolean;
          readonly label: string;
          onMyChangeEvent?: (id: number) => any;
          onMyClickEvent?: (id: number) => any;
        }
      >
    >();
    
    // debugging the error
    const _: ComponentAnnotations<
      VueFramework,
      {
        readonly disabled: boolean;
        readonly label: string;
        onMyChangeEvent?: (id: number) => any;
        onMyClickEvent?: (id: number) => any;
      }
    > = meta;
    
    const __: typeof meta = _;
    

    However, we can not expect that from any (external) contributor.

    Would it be possible to make those errors more readable?

    opened by kasperpeulen 1
  • Improve CLI error messages

    Improve CLI error messages

    Use generics to give better error messages than "Arguments for the rest parameter 'MISMATCH' were not provided" for most toEqualTypeOf cases and many toMatchTypeOf cases. This trades off some implementation complexity for better end-user error messages. Essentially, write a special <Expected extends ...> constraint for each overload of each method, which does some crazy conditional logic, which boil down to:

    • <Expected extends Actual> for toEqualTypeOf (when we aren't in a .not context)
    • <Expected extends Satisfies<Actual>> for toMatchTypeOf

    Anyone interested, have a look at the snapshot updates in errors.test.ts to see what the real world difference is.

    Each of these constraints apply only when we know it's going to "fail" - i.e. Satisfies<...> is a fairly meaningless helper type that is used to try to show errors at the type-constraint level rather than the ...MISMATCH: MismatchArgs<...> level which won't give good error messages.

    When using .not, the constraint just becomes extends unknown, and you'll have to squint as before.

    See also: #14 for the better long-term solution, if the TypeScript team decide to merge the throw types PR. See also: #13 for a hopefully-complementary improvement to the information on hover, which will improve the cases this doesn't cover.

    TODO:

    • [ ] See if the expectTypeOf({a: 1}).toMatchTypeOf({a: 'one'}) case can also be improved.
    • [ ] Document. The constraints are a bit different to what most users would be used to, so it's worth highlighting the best way to read error messages and clarify when they might default to "Arguments for the rest parameter 'MISMATCH' were not provided"
    opened by mmkal 7
  • port throw types PR from mmkal/ts#152

    port throw types PR from mmkal/ts#152

    Copy-paste of https://github.com/mmkal/ts/pull/152

    Note - since this is a copy paste of a mod of an old version, a few features that have gone in since then may be regressed. This isn't going to go in anyway unless throw-types are added to TypeScript officially though.

    opened by mmkal 0
  • Improve errors. Add actual and expected types to MismatchArgs

    Improve errors. Add actual and expected types to MismatchArgs

    Updates MismatchArgs to, rather than create the tuple [never], creates a tuple with an object literal containing the Actual type and the expected type.

    How the expected type is shown depends on the specific match. I will most likely post screenshots showing the errors for the various matchers in the PR conversation.

    I left toBeCallableWith and toBeConstructibleWith alone as these do not use MismatchArgs and I couldn't work out how to use Variadic Tuple Types to make it work. These error messages are easier to understand anyways.

    If https://github.com/microsoft/TypeScript/pull/40468 is merged, we could drop MismatchArgs in favor of having a return that, rather than return true, uses a type throw if the type does not match.

    opened by trevorade 6
  • Would you mind adding a copyright / license header to index.ts?

    Would you mind adding a copyright / license header to index.ts?

    Thank you for authoring this library! I'd like to start using it in my work but want to make sure that we're attributing it correctly.

    Can you please add a short copyright notice to the index.ts file?


    Some examples:

    // Copyright 2022 [name of copyright owner]
    
    /**
     * Copyright 2022 [name of copyright owner]
     * @license Apache-2.0
     */
    
    opened by trevorade 2
Releases(v0.15.0)
  • v0.15.0(Oct 21, 2022)

    What's Changed

    • Update Extends to not distribute over union types by @trevorade in https://github.com/mmkal/expect-type/pull/12

    New Contributors

    • @trevorade made their first contribution in https://github.com/mmkal/expect-type/pull/12

    Full Changelog: https://github.com/mmkal/expect-type/compare/v0.14.2...v0.15.0

    Source code(tar.gz)
    Source code(zip)
  • v0.14.2(Sep 7, 2022)

  • v0.14.1(Sep 7, 2022)

    Pure docs update

    • Mention https://github.com/SamVerschueren/tsd/issues/142 cd3b522
    • lint markdown 026a117
    • add badges 929558d
    • Create ci.yml d9eecdf

    https://github.com/mmkal/expect-type/compare/v0.14.0...v0.14.1

    Source code(tar.gz)
    Source code(zip)
  • v0.14.0(Sep 6, 2022)

  • v0.14.0-0(Sep 5, 2022)

    • preminor release for standalone repo
    • works around a typescript bug that seems to have been introduced in one of the recent typescript versions

    https://github.com/mmkal/expect-type/compare/dddaf3a6911af455c3dc9d2c3b88f238a191da66...v0.14.0-0

    Source code(tar.gz)
    Source code(zip)
Owner
Misha Kaletsky
Head of Technology at @hidrb, person on the side
Misha Kaletsky
Types generator will help user to create TS types from JSON. Just paste your single object JSON the Types generator will auto-generate the interfaces for you. You can give a name for the root object

Types generator Types generator is a utility tool that will help User to create TS Interfaces from JSON. All you have to do is paste your single objec

Vineeth.TR 16 Dec 6, 2022
An overly simplified Angular tool for interacting with Smart Contracts, demod at ng-conf 2022.

AngularOperator This is a sample repo and tool created for ng-conf 2022. It contains a normal Angular app designed to interact with the blockchain. It

Stephen Fluin 8 Oct 7, 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

Svante Jonsson IT-Högskolan 3 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

null 4 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

null 14 Jan 3, 2023
Make sure a specific version and package-manger to be used in project.

pm-keeper A simple way to force package-manager in your project. usage Add a preinstall script in your project's package.json, link this: { "scripts

阿五 13 Sep 25, 2022
Reddit Page CLONE using Angular! A repository to contribute at hacktoberfest 2022. Make sure to share love by giving it a star.🌟 Have a great day!

Reddit_tool Reddit Site CLONE using Angular, Springboot and Swagger OpenAI ! Introduction This project was developed with the following technologies:

Momo-Solaris8 4 Oct 20, 2022
SAP Community Code Challenge: This repository contains an empty OpenUI5 application and end-to-end tests written with wdi5. Take part in the challenge and develop an app that passes the tests.

SAP Community Code Challenge - UI5 The change log describes notable changes in this package. Description This repository is the starting point for the

SAP Samples 8 Oct 24, 2022
Converts JSX to HTML strings at compile time.

unplugin-jsx-string Converts JSX to HTML strings at compile time. Installation npm i unplugin-jsx-string Vite // vite.config.ts import JsxString from

三咲智子 9 Sep 3, 2022
Jsonup - This is a zero dependency compile-time JSON parser written in TypeScript

jsonup This is a zero dependency compile-time JSON parser written in TypeScript.

TANIGUCHI Masaya 39 Dec 8, 2022
Allows you to build fetcher function by URL at compile-time.

fetch.macro Allows you to build fetcher function by URL at compile-time. Usage Simply install and configure babel-plugin-macros and then use fetch.mac

RiN 18 Nov 7, 2022
Experimental compile-time optimizer for SolidJS

solid-optimizer Experimental compile-time optimizer for SolidJS Install npm i -D solid-optimizer yarn add -D solid-optimizer pnpm add -D solid-optimiz

Alexis H. Munsayac 6 Oct 21, 2022
Compile Master CSS ahead of time with zero-configuration integration with build tools

CSS Compiler Compile Master CSS ahead of time with zero-configuration integration with build tools On this page Usage webpack.config.js vite.config.js

Master 5 Oct 31, 2022
Functions and objects that make it easier to add fields to Portable Text editors for accessibility meta information, like language changes or abbreviations.

Porta11y Porta11y is a collection of accessibility-focused annotations, decorators and validators for Sanity’s Portable Text editor. Portable Text is

Hidde de Vries 21 Aug 25, 2022
CA9.io Portal Seed Server. Makes sure the project files are always accessable.

Torrent Seed Server What is this about? This project helps users of CA9.io Metaverse to keep their files and addons permanently available. Since we us

CA9.io, TM9657 GmbH 2 Feb 3, 2022
A simple nodejs module which is wrapper around solc that allows you to compile Solidity code

Simple Solidity Compiler It's a simple nodejs module which is wrapper around solc that allows you to compile Solidity code and get the abi and bytecod

King Rayhan 4 Feb 21, 2022
A plugin that can find the paths between two notes. Not sure who will want to use it...

Obsidian Path Finder Plugin Install BRAT Install Obsidian42-BRAT plugin. Click Add new beta plugin and fill in jerrywcy/obsidian-path-finder. Activate

jerrywcy 29 Dec 31, 2022
🚀👩‍🚀This repo contains all the files to follow along and implement a MultiChain NFT MarketPlace! Be sure to watch my Youtube tutorials so you can learn and follow along!

Multi-Chain NFT Marketplace ?? ??‍?? This repo contains all the files to follow along and implement a MultiChain NFT MarketPlace! Be sure to watch my

Net2Dev 30 Jan 5, 2023
A Svelte parser that compiles to Mitosis JSON, allowing you to write Svelte components once and compile to every framework.

Sveltosis Still in development A Svelte parser that compiles to Mitosis JSON, allowing you to write Svelte components once and compile to every framew

sveltosis 70 Nov 24, 2022