add some id and http types

This commit is contained in:
2023-08-20 20:13:43 -07:00
parent c46c33eebf
commit 1d7a49ced1
7 changed files with 73 additions and 24 deletions

View File

@@ -1,27 +1,29 @@
Template project for creating new TypeScript type-definition-only packages
---
## Get Started
### Pull down the code
Collection of general-purpose type definitions
```bash
git init
git pull https://gitea.jbrumond.me/templates/typescript-types.git master
# Update project npm config to refer to correct registry for the @js scope
echo '@js:registry=https://gitea.jbrumond.me/api/packages/js/npm/' >> ./.npmrc
npm install --save-dev @js/types
```
### Update configuration
- In `package.json`, update any fields like `name`, `description`, `repository`, etc.
## Building
No build step is necessary, as the types are written directly as `.d.ts` files to begin with.
## Types
```ts
import {
// Various identifier strings
HttpURL,
UUID,
SnowflakeID,
// HTTP verbs
HttpVerb,
HttpVerbExtended,
// Pino-compatible logger interface
Logger,
LogFn,
} from '@js/types';
```