@rbxts/sheetvalues
TypeScript icon, indicating that this package has built-in type declarations

2.0.3-ts.1 • Public • Published

SheetValues

TS typings for boatbomber's SheetValues.

Installation

NPM

Run npm i @rbxts/sheetvalues in your project directory.

Usage

With a sheet like this:

Name SomeKey SomeOtherKey
Foo 50 test
Bar 90 test2

One can extract values with the following code:

import SheetValues from "@rbxts/sheetvalues";

// The type parameter represents the sheet
const sheet = new SheetValues<{
  Foo: {
    SomeKey: number;
    SomeOtherKey: string;
  };
  Bar: {
    SomeKey: number;
    SomeOtherKey: string;
  };
}>("Spread id extracted from the URL");

const a = sheet.Values.Foo.SomeKey; // 50
const b = sheet.Values.Bar.SomeOtherKey; // "test2"

To contribute to SheetValues, please file Pull Requests and Issues in its GitHub repository, and not in the repository of this package. The types here will reflect the most recent release of the Luau code.

Readme

Keywords

Package Sidebar

Install

npm i @rbxts/sheetvalues

Weekly Downloads

0

Version

2.0.3-ts.1

License

MIT

Unpacked Size

24.5 kB

Total Files

7

Last publish

Collaborators

  • tacheometry