# rbxts-object-to-tree

> Converts an object in Roblox Studio into its TS tree form.

Latest version **0.0.0** (published 2019-07-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install rbxts-object-to-tree
pnpm add rbxts-object-to-tree
yarn add rbxts-object-to-tree
bun add rbxts-object-to-tree
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2019-07-03 |
| First published | 2019-07-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Validark |
| Maintainers | validark |

## Links

- npm: https://www.npmjs.com/package/rbxts-object-to-tree
- Repository: https://github.com/roblox-ts/demo-bundle
- Homepage: https://github.com/roblox-ts/demo-bundle#readme
- Issues: https://github.com/roblox-ts/demo-bundle/issues
- npm.io page: https://npm.io/package/rbxts-object-to-tree

## Dependencies (3)

- [@rbxts/make](https://npm.io/package/@rbxts/make.md) ^1.0.1
- [@rbxts/types](https://npm.io/package/@rbxts/types.md) ^1.0.226
- [@rbxts/services](https://npm.io/package/@rbxts/services.md) ^1.0.23

## Recent versions

- 0.0.0 (latest) — 2019-07-03

## README

# roblox-ts object-to-tree

You can install this [plugin here](https://www.roblox.com/library/3379119778/rbxts-object-to-tree).

Simply select the instance you want converted into a tree, and click on the plugin to generate its tree.

Outputted trees look like so:

```ts
type SpawnLocation = SpawnLocation & {
	Decal: Decal;
	Data: Configuration & {
		NumSpawns: IntValue;
		GiveForceField: BoolValue;
	};
}
```

The plugin also supports overriding services which are browsable in Roblox Studio. For example:

```ts
interface Workspace extends Model {
	Terrain: Terrain;
	Camera: Camera;
	Baseplate: Part & {
		BFC: BoolValue;
	};
	SpawnLocation: SpawnLocation & {
		Decal: Decal;
		Data: Configuration & {
			NumSpawns: IntValue;
			GiveForceField: BoolValue;
		};
	};
}
```

Then, anywhere you access `Workspace`, you can access the defined members!

```ts
const workspace = game.GetService("Workspace");
print(++workspace.SpawnLocation.Data.NumSpawns.Value);
```

To automatically insert these files into your project open up your project and run `npx io-serve`, then click the plugin in studio to generate your files.


###### Note: This plugin in no way guarantees that objects defined in TS this way will exist at run-time. Scripts can rename instances, move them around, or delete them. Don't do those things if you want the definition to be valid.

###### Link to io-serve [here](https://www.npmjs.com/package/io-serve)


## Help wanted

If someone would like to make an icon for this plugin, it would be much appreciated!

---
_Source: https://npm.io/package/rbxts-object-to-tree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
