@rbxts/sheetvalues
v2.0.3-ts.1
Published
Use Google Sheets as a live value updater for Roblox games. roblox-ts typings for SheetValues by boatbomber
Downloads
9
Readme
SheetValues
TS typings for boatbomber's SheetValues.
Installation
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.