Skip to content

v4.1.0

Compare
Choose a tag to compare
@sebelga sebelga released this 11 Apr 15:47
· 149 commits to master since this release

Features

Typescript support (#89)

gstore-node has now a Type declaration file that should make development in Typescript much easier!
Refer to the documentation to see how to add Typescript types to your Schemas.

Schema.property.type

The Schema properties types should be passed from now on as Javascript types.

// before
const schema = new Schema({
    name: { type: 'string' },
    age: { type: 'int' }
});

// after
const schema = new Schema({
    name: { type: String },
    age: { type: Number }
});

The old format is still supported but will be deprecated in future release.