# @types/fxn

> TypeScript definitions for fxn

Latest version **0.0.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/fxn
pnpm add @types/fxn
yarn add @types/fxn
bun add @types/fxn
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2023-11-07 |
| First published | 2016-11-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/fxn
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fxn
- npm.io page: https://npm.io/package/@types/fxn

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 0.0.3 (latest) — 2023-11-07
- 0.0.0 (ts2.0) — 2016-11-30
- 0.0.2 — 2023-10-18
- 0.0.1 — 2023-09-14

## README

# Installation
> `npm install --save @types/fxn`

# Summary
This package contains type definitions for fxn (https://github.com/poly/fxn).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fxn.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fxn/index.d.ts)
````ts
/// <reference types="node"/>

export type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "OPTIONS";

export interface HttpHeaders {
    [item: string]: string;
}

export abstract class Controller {
    protected _method: HttpMethod;
    protected _path: string;
    protected _requestHeaders: Object;
    protected _headers: Object;
    protected _status: number;
    protected _responder: Function;
    protected _securityPolicies: Object;
    protected params: any;

    constructor(path: string, method: string, requestHeaders: Object, params: Object, responder: Function);
    convertMethod(method: HttpMethod, id: number): string;
    run(): void;
    notImplemented(msg: string, details: Object): boolean;
    before(): void;
    after(): void;
    get(): void;
    put(): void;
    post(): void;
    del(): void;
    options(): void;
    index(): void;
    show(): void;
    update(): void;
    create(): void;
    destroy(): void;
    status(value: number): boolean;
    setHeaders(): HttpHeaders;
    setHeader(key: string, value: string): string;
    appendHeader(key: string, value: string): string;
    getHeader(key: string, value: string): string;
    code(code: number): number;
    getStatus(): number;
    render(data: Buffer | String | Object): void;
    allowOrigin(value: string): this;
    securityPolicy(directive: string, src: string): string;
    redirect(location: string): void;
}

export abstract class Daemon {
    constructor(string: string);
}

export abstract class Application {
    constructor(string: string);
    send: Function;
}

export abstract class Router {}
export abstract class Scheduler {}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Adam Charron](https://github.com/charrondev).

---
_Source: https://npm.io/package/@types/fxn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
