WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Export AdapterMeta for toNodeHandler and toFetchHandler in Node.js #148

@alpheusmtx

Description

@alpheusmtx

Describe the feature

While adding types to variable assigned with toNodeHandler and toFetchHandler, AdapterMeta is missing:

import type { Express } from "express";
import type { 
    FetchHandler, 
    NodeHttpHandler,
    AdapterMeta, // missing
} from "srvx";
import type { AdapterMeta } from "srvx/node"; // missing

import express from "express";
import { toFetchHandler, toNodeHandler } from "srvx/node";

const app: Express = express();

const fetchHandler: FetchHandler & AdapterMeta = toFetchHandler(app);

const nodeHandler: NodeHttpHandler & AdapterMeta = toNodeHandler(fetchHandler);

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions