generated from templates/typescript-types
add some id and http types
This commit is contained in:
38
readme.md
38
readme.md
@@ -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';
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user