typetype icon indicating copy to clipboard operation
typetype copied to clipboard

Create a webpack loader

Open kije opened this issue 1 year ago • 0 comments

Create a webpack loader so integration in build chain and existing projects is straight-forward.

This way it would be possible to use it like this:

// src/parseURL.type

type function parseURL = (text) => ^{
    if (parseProtocol<text> extends [infer protocol, infer rest]) {
        return {
            protocol,
            rest
        }
    } else {
        return never
    }
}
// src/my-app.ts
import type { parseURL } from './parseURL.type';

const parseURLImpl: parseURL = () => ...;

kije avatar Jun 06 '24 09:06 kije