Logo
Explore Help
Sign In
MarcSync/nodejs-client
2
1
Fork 0
You've already forked nodejs-client
Code Issues Pull Requests Actions Packages Projects Releases 8 Wiki Activity

8 Releases 8 Tags

RSS Feed
  • v1.2.0 e696c78790

    Version 1.2.0 - Generic Types Update Stable

    MarciiTheDev released this 2023-12-06 15:51:55 +00:00 | 6 commits to main since this release

    Added the ability to generically interact with Entries inside of Collections, which now allows you to specify how entries are structured in your Database via Interfaces.

    Example:

    interface Dog extends EntryData {
        name: string,
        age: number,
        race: name
    }
    
    const collection = ms.getCollection<Dog>("dog-list");
    collection.getEntries({
        name: "Bella"
    }).then(entry => {
        console.log(`Bella's race is: ${entry.getValue("race")}`)
    });
    

    TypeScript automatically detects the type of all of the entry's values with the help of the interface we have created in the above example.

    Changelog:

    • Added Generic Types
    • Removed .getValuesAs<T>

    What's Changed

    • Added Generic Types - Version 2.0.0 by @MarciiTheDev in https://github.com/MarciiTheDev/marcsync-nodejs-client/pull/4
    • Version 2.0.0 Release Merge by @MarciiTheDev in https://github.com/MarciiTheDev/marcsync-nodejs-client/pull/5

    New Contributors

    • @MarciiTheDev made their first contribution in https://github.com/MarciiTheDev/marcsync-nodejs-client/pull/4

    Full Changelog: https://github.com/MarciiTheDev/marcsync-nodejs-client/compare/v1.1.4-dev...v1.2.0

    Downloads
    • Source Code (ZIP)
    • Source Code (TAR.GZ)
Powered by Gitea Version: 1.23.4 Page: 61ms Template: 7ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API