npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@rbxts/rquery

v1.2.0

Published

A small feature-rich Roblox-TS package for more helpful types and simpler management of instances, properties, tags, and attributes.

Readme


⚠️ PLEASE NOTE: this package is currently in active development and is far from finished ⚠️

A small feature-rich Roblox-TS package for more helpful types and simpler management of instances, properties, and attributes.

Obviously inspired in some part by jQuery.

It includes an RQuery namespace for instance creation and management as well as a ton of method overrides under the $<BaseType> type.

It's this simple

npm i @rbxts/rquery

RQuery combines the already existent methods of indexing children in Roblox-TS and combines it with type overwrites to get better type prediction and autofill.

it's also NON-STRICT meaning you can still use it COMPLETELY normally without any RQuery stuff.


Better Children Indexing

RQueries override default Roblox-TS instance functions with better typed ones allowing for more type predictions and autofill.

This doesn't change anything but how you write.

type guh = $<Part & {
    baby: Decal,
    surface: SurfaceGui & {
        img: ImageLabel
    }
}>


const part = RQuery.UnreliablePath<guh>("Workspace\\*Part");


// fully predicts "baby"
part?.FindFirstChild("baby")


// fully predicts "surface" and predicts img
part?.WaitForChild("surface").FindFirstChild("img");

you can also use it to define attributes and tags

type guh = $<Part & {
    baby: Decal,
    surface: SurfaceGui & {
        img: ImageLabel
    },
    $attributes: {
        guh: 5
    },
    $tags: [
        "CoolPart"
    ]
}>

const part = RQuery.UnreliablePath<guh>("Workspace\\*Part");

part?.GetAttribute("guh");

part?.HasTag("CoolPart");

and, as said previously, works without using anything from RQuery but the types

type guh = $<Part & {
    baby: Decal,
    surface: SurfaceGui & {
        img: ImageLabel
    }
}>

const part = Workspace.WaitForChild("Part") as guh;

// also gives full types
part.WaitForChild("surface").FindFirstChild("img")

Attributes and Tags

you can overwrite the default tags and attributes like indexing children normally

// yourproject/src/rquery.d.ts

interface RQueryTags extends RQueryDefaultTags {
    guh: true
}

interface RQueryAttributes {
    burger: 1
}

using this you can also define tag attributes

// yourproject/src/rquery.d.ts
declare global {
    interface RQueryTags extends RQueryDefaultTags {
        CreatureSpawner: {
            // note: RQuery also comes with the NonstrictString type you can use
            Groups?: keyof typeof CreatureGroups | NonstrictString
            Items?: keyof typeof CreatureList | NonstrictString
        }
    }
}
type guh =  $<Part & {
    $tags: [
        "CreatureSpawner"
    ],
    $attributes: {
        AAGHH: 5
    }
}> 

const part = RQuery.UnreliablePath<guh>("Workspace\\*Part");

// fully typed tells you attributes you can get
const items = part?.GetAttribute("Items")

// also fully predicted but nonstrict
if (items === "Glup") {}

Instance Management

RQuery has a few tools for improving instance management in projects.

First: RQuery.Path and RQuery.UnreliablePath which lets you path to an instance through an extremely feature rich system including:

  • shorthand names (Shared\\, Server\\, Client\\, LocalPlayer\\, Character\\, Gui\\)
  • unique names (@name)
  • yields (*name)
  • unique name yields (*@name)
  • relative (2nd argument)

RQuery.Path always gives back T so it won't tell you where it can fail good for stuff you know exists on the server

RQuery.UnreliablePath gives T | undefined and is useful on the client when you don't know if the instance exists

RQuery.Path("Workspace\\Baseplate\\Texture");
RQuery.Path("@Baseplate");
RQuery.Path("Workspace\\*Baseplate\\*Texture");
RQuery.Path("*Baseplate\\*Texture", Workspace);
RQuery.Path("*@Baseplate\\*Texture");

Second: RQuery.Instantiate which lets you create instances with complex properties, children, and attributes on the fly.

(also RQuery.Propertize)

// full type predictions for instance names, properties, children, and attributes

const part = RQuery.Instantiate("Part", {
    "Parent": Workspace,

    "Size": new Vector3(1, 1, 1),
    "Transparency": 1,

    "Attributes": {
        guh: 1,
        AGHH: "buh"
    },

    "Tags": [
        "AwesomePart"
    ],

    "Children": [
        RQuery.Instantiate("Decal", {
            "Name": "baby",
            "Texture": "rbxassetid://8088027399"
        })
    ]
})

Lastly: RQuery.New which lets you create from a class and automatically give it properties

this is mostly useful for things like params (RaycastParams, OverlapParams)

// also fully type predicted

const params = RQuery.New(RaycastParams, {
    RespectCanCollide: true,
    CollisionGroup: "PlayerPass"
})

Collaborators


Disclaimer

this package and the developers behind it are not associated with Roblox, Roblox-TS, or jQuery