generated from templates/typescript-types
	
		
			
				
	
	
		
			49 lines
		
	
	
		
			709 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			709 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| 
 | |
| Collection of general-purpose type definitions
 | |
| 
 | |
| ```bash
 | |
| # 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
 | |
| ```
 | |
| 
 | |
| ## Types
 | |
| 
 | |
| ```ts
 | |
| import {
 | |
| 	// Various identifier strings
 | |
| 	HttpURL,
 | |
| 	HttpURLSchemeless,
 | |
| 	UUID,
 | |
| 	SnowflakeID,
 | |
| 
 | |
| 	// HTTP verbs
 | |
| 	HttpVerb,
 | |
| 	HttpVerbExtended,
 | |
| 
 | |
| 	// Pino-compatible logger interface
 | |
| 	Logger,
 | |
| 	LogFn,
 | |
| 
 | |
| 	// Function helpers
 | |
| 	Func,
 | |
| 	Params,
 | |
| 	FirstParam,
 | |
| 	NonFirstParams,
 | |
| 	WithoutFirstParam,
 | |
| 
 | |
| 	// Language / locale
 | |
| 	Locale,
 | |
| 
 | |
| 	// Date / time
 | |
| 	ISODate,
 | |
| 	ISOTime,
 | |
| 	ISOZoneOffset,
 | |
| 	ISOTimestamp,
 | |
| 	TimeShort,
 | |
| 	LocalDateTime,
 | |
| 	Timezone,
 | |
| } from '@js/types';
 | |
| ```
 |