Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@dreipol/interfaces
Advanced tools
This repo shows some default data structure for the APIs.
npm i @dreipol/interfaces -D
src/interfaces/api
API for data that is coming from the CMS
src/interfaces/cms
Interfaces that represent data coming from the backend/cms
src/interfaces/app
Some global interface used by the app structure
src/interfaces/router
All Vue routing related interfaces
Guide for adding a new interface
If you have to extends for example the IRouteData
interface that is already given from the framework
you can do it like this
export {IData} from '@dreipol/interfaces';
export interface IAppRouteData extends IData {
isHeaderColorPrimary: boolean;
}
Group properties together. Seperate primitives and non-primitives props for better readability
DO
export interface IProduct {
name: string;
color: string;
abstract: string;
product_image: IImage;
product_logo: IImage;
specs: IProductSpecs
link: ILink;
}
DON'T
export interface IProduct {
name: string;
product_logo: IImage;
specs: IProductSpecs
color: string;
product_image: IImage;
abstract: string;
link: ILink;
}
DO Use primitve types like string
, or number
export interface IImage {
url: string;
alt: string;
}
DON'T - Do not use the type String
or Number
export interface IImage {
url: String;
alt: String;
}
{
"data": {
"containers": {
"main": {
"type": "cmp-main",
"plugins": [{}, {}, {}]
}
},
"meta": {
"title": "Cas Study #2",
"description": ""
}
}
}
FAQs
Default TypeScript interface for APIs
We found that @dreipol/interfaces demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.