repo stringclasses 350
values | file_path stringlengths 29 200 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 2 1.01M | tokens int64 2 598k |
|---|---|---|---|---|---|
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/cameras/fixed.ts | roblox-ts | .ts | import { Dependency } from "@flamework/core";
import { Component, type Components } from "@flamework/components";
import { Workspace as World } from "@rbxts/services";
import { $nameof } from "rbxts-transform-debug";
import { Player } from "client/utility";
import { CameraComponent } from "client/base-components/camer... | 216 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/cameras/fly-on-the-wall.ts | roblox-ts | .ts | import { Dependency, type OnRender } from "@flamework/core";
import { Component, type Components } from "@flamework/components";
import { Workspace as World } from "@rbxts/services";
import { $nameof } from "rbxts-transform-debug";
import { Player } from "client/utility";
import { CameraComponent } from "client/base-... | 291 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/ui/animations/gradient.ts | roblox-ts | .ts | import { OnStart } from "@flamework/core";
import { Component } from "@flamework/components";
import { TweenInfoBuilder } from "@rbxts/builders";
import { tween } from "@rbxts/instance-utility";
import { $nameof } from "rbxts-transform-debug";
import ButtonTweenAnimation from "client/base-components/button-tween-anima... | 279 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/ui/animations/rotation.ts | roblox-ts | .ts | import { OnStart } from "@flamework/core";
import { Component } from "@flamework/components";
import { TweenInfoBuilder } from "@rbxts/builders";
import { tween } from "@rbxts/instance-utility";
import { $nameof } from "rbxts-transform-debug";
import ButtonTweenAnimation from "client/base-components/button-tween-anima... | 271 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/ui/animations/scale.ts | roblox-ts | .ts | import { OnStart } from "@flamework/core";
import { Component } from "@flamework/components";
import { TweenInfoBuilder } from "@rbxts/builders";
import { tween } from "@rbxts/instance-utility";
import { $nameof } from "rbxts-transform-debug";
import ButtonTweenAnimation from "client/base-components/button-tween-anima... | 300 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/ui/animations/spring-scale.ts | roblox-ts | .ts | import { OnRender, OnStart } from "@flamework/core";
import { Component } from "@flamework/components";
import { $nameof } from "rbxts-transform-debug";
import { Spring } from "shared/classes/spring";
import BaseButtonAnimation from "client/base-components/base-button-animation";
interface Attributes {
readonly Sp... | 372 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/ui/animations/transparency.ts | roblox-ts | .ts | import { OnStart } from "@flamework/core";
import { Component } from "@flamework/components";
import { TweenInfoBuilder } from "@rbxts/builders";
import { tween } from "@rbxts/instance-utility";
import { $nameof } from "rbxts-transform-debug";
import ButtonTweenAnimation from "client/base-components/button-tween-anima... | 280 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/ui/page-route.ts | roblox-ts | .ts | import type { OnStart } from "@flamework/core";
import { Component } from "@flamework/components";
import { getChildrenOfType } from "@rbxts/instance-utility";
import { $nameof } from "rbxts-transform-debug";
import { PlayerGui } from "client/utility";
import DestroyableComponent from "shared/base-components/destroya... | 276 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/ui/smooth-list-layout.ts | roblox-ts | .ts | import type { OnStart } from "@flamework/core";
import { Component } from "@flamework/components";
import { TweenInfoBuilder } from "@rbxts/builders";
import { getChildrenOfType, tween } from "@rbxts/instance-utility";
import { endsWith } from "@rbxts/string-utils";
import { $nameof } from "rbxts-transform-debug";
imp... | 475 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/ui/version-label.ts | roblox-ts | .ts | import type { OnStart } from "@flamework/core";
import { Component, BaseComponent } from "@flamework/components";
import { $git, $nameof } from "rbxts-transform-debug";
import type { LogStart } from "shared/hooks";
import { PlayerGui } from "client/utility";
@Component({
tag: $nameof<VersionLabel>(),
ancestorWhit... | 137 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/controllers/audio.ts | roblox-ts | .ts | import { Controller } from "@flamework/core";
import { Workspace as World, SoundService as Sound } from "@rbxts/services";
import { Events } from "client/network";
import { ReplicationOptions, SerializedReplicable } from "shared/classes/replicable";
import { Serializers } from "shared/network";
import { PlaySoundOptio... | 386 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/controllers/camera.ts | roblox-ts | .ts | import { Controller, OnRender, type OnInit } from "@flamework/core";
import { Workspace as World } from "@rbxts/services";
import { Lazy } from "@rbxts/lazy";
import Object from "@rbxts/object-utils";
import Iris from "@rbxts/iris";
import type { LogStart } from "shared/hooks";
import { DefaultCamera } from "client/co... | 767 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/controllers/control-panel.ts | roblox-ts | .ts | import { Controller, type OnStart } from "@flamework/core";
import { StandardActionBuilder } from "@rbxts/mechanism";
import { processDependency } from "@rbxts/flamework-meta-utils";
import Iris from "@rbxts/iris";
import type { LogStart } from "shared/hooks";
import { OnInput } from "client/decorators";
import { Play... | 613 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/controllers/input.ts | roblox-ts | .ts | import { Controller } from "@flamework/core";
import { StandardActionBuilder } from "@rbxts/mechanism";
import type { LogStart } from "shared/hooks";
import { OnInput, OnInputRelease } from "client/decorators";
export const enum ActionID {
LMB,
RMB,
MMB,
LeftTrigger,
RightTrigger,
Crouch
}
/** Handles al... | 177 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/controllers/mouse.ts | roblox-ts | .ts | import { Controller, type OnInit, type OnRender } from "@flamework/core";
import { UserInputService as UserInput, Workspace as World } from "@rbxts/services";
import { AxisAction, AxisActionBuilder, StandardActionBuilder } from "@rbxts/mechanism";
import { RaycastParamsBuilder } from "@rbxts/builders";
import Charm, { ... | 1,535 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/controllers/performance-stats.ts | roblox-ts | .ts | import { Controller } from "@flamework/core";
import { Workspace as World, Stats } from "@rbxts/services";
import { eMath } from "@rbxts/atlas";
import Iris from "@rbxts/iris";
import { roundDecimal } from "shared/utility/numbers";
import type { ControlPanelDropdownRenderer } from "shared/structs/control-panel";
impo... | 743 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/controllers/ui-effects.ts | roblox-ts | .ts | import { Controller } from "@flamework/core";
import { TweenInfoBuilder } from "@rbxts/builders";
import { Lazy } from "@rbxts/lazy";
import { tween } from "@rbxts/instance-utility";
import type { LogStart } from "shared/hooks";
import { PlayerGui } from "client/utility";
@Controller()
export class UIEffectsControlle... | 407 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/decorators.ts | roblox-ts | .ts | import { Modding } from "@flamework/core";
import { InputManager, StandardAction, AxisAction } from "@rbxts/mechanism";
import { callMethodOnDependency } from "@rbxts/flamework-meta-utils";
import type { ClientReceiver as ClientEventReceiver } from "@flamework/networking/out/events/types";
import type { ClientReceiver ... | 861 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/utility.ts | roblox-ts | .ts | import { Players } from "@rbxts/services";
export const Player = Players.LocalPlayer;
export const PlayerGui = Player.WaitForChild<PlayerGui>("PlayerGui"); | 33 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/scripts/run-tests.server.ts | roblox-ts | .ts | import { TestRunner } from "@rbxts/runit";
import { ServerScriptService } from "@rbxts/services";
const testRunner = new TestRunner(
ServerScriptService.WaitForChild("Tests")
);
testRunner.run({ colors: true }); | 52 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/server/cmdr/commands/set-data.ts | roblox-ts | .ts | import type { CommandDefinition } from "@rbxts/cmdr";
export = identity<CommandDefinition>({
Name: "set-data",
Aliases: ["data-set"],
Description: "Set the data at the given directory to the given value",
Group: "Dev",
Args: [
{
Type: "string",
Name: "Directory",
Description: "Directory... | 124 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/server/cmdr/commands/set-dataServer.ts | roblox-ts | .ts | import { Firebase } from "@rbxts/firebase";
import type { CommandContext } from "@rbxts/cmdr";
import { getFirebaseInfo } from "server/services/third-party/data";
export = async function (context: CommandContext, directory: string, value: unknown): Promise<void> {
try {
const firebase = new Firebase(...await ge... | 148 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/server/cmdr/start.server.ts | roblox-ts | .ts | import { Cmdr } from "@rbxts/cmdr";
const parent = script.Parent as Folder;
Cmdr.RegisterDefaultCommands();
Cmdr.RegisterCommandsIn(parent.WaitForChild<Folder>("commands"));
Cmdr.RegisterTypesIn(parent.WaitForChild<Folder>("types"));
Cmdr.RegisterHooksIn(parent.WaitForChild<Folder>("hooks")) | 66 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/server/cmdr/types/any.ts | roblox-ts | .ts | import type { Registry } from "@rbxts/cmdr";
import { isNaN } from "shared/utility/numbers";
export = function (registry: Registry): void {
registry.RegisterType("any", {
Parse: value => {
if (tonumber(value) !== undefined && !isNaN(tonumber(value)!))
return tonumber(value)!;
else if (value ... | 132 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/server/decorators.ts | roblox-ts | .ts | import { callMethodOnDependency } from "@rbxts/flamework-meta-utils";
import type { Serializer } from "@rbxts/flamework-binary-serializer";
import type { ServerReceiver as ServerEventReceiver } from "@flamework/networking/out/events/types";
import type { ServerReceiver as ServerFunctionReceiver } from "@flamework/netwo... | 441 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/server/hook-managers/players.ts | roblox-ts | .ts | import { Service, Modding, type OnStart } from "@flamework/core";
import { Players } from "@rbxts/services";
import type { OnPlayerJoin, OnPlayerLeave } from "server/hooks";
@Service({ loadOrder: 1 })
export class PlayersService implements OnStart {
public onStart(): void {
const joinListeners = new Set<OnPlaye... | 255 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/server/services/third-party/data.ts | roblox-ts | .ts | import { Service, type OnInit } from "@flamework/core";
import { DataStoreService as Data } from "@rbxts/services";
import { Firebase } from "@rbxts/firebase";
import Signal from "@rbxts/signal";
import type { LogStart } from "shared/hooks";
import type { OnPlayerJoin, OnPlayerLeave } from "server/hooks";
import { Eve... | 1,027 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/server/services/transactions.ts | roblox-ts | .ts | import { OnInit, Service } from "@flamework/core";
import { MarketplaceService as Market, Players } from "@rbxts/services";
import { DataService } from "./third-party/data";
import Log from "shared/log";
type RewardHandler = (player: Player) => void;
const enum ProductIDs {
// Gold5000 = 1620635951,
}
@Service()
e... | 367 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/shared/base-components/destroyable.ts | roblox-ts | .ts | import { BaseComponent } from "@flamework/components";
import { Janitor } from "@rbxts/janitor";
export default class DestroyableComponent<A extends {} = {}, I extends Instance = Instance> extends BaseComponent<A, I> {
protected readonly janitor = new Janitor;
public destroy(): void {
if (!("Destroy" in this.... | 90 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/shared/classes/replicable.ts | roblox-ts | .ts | import type {
ClientReceiver as ClientEventReceiver,
ClientSender as ClientEventSender,
ServerSender as ServerEventSender,
ServerReceiver as ServerEventReceiver
} from "@flamework/networking/out/events/types";
import type { Serializer } from "@rbxts/flamework-binary-serializer";
import { Players, ServerScriptSe... | 807 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/shared/classes/spring.ts | roblox-ts | .ts | import Iris from "@rbxts/iris";
import { isNaN } from "shared/utility/numbers";
import type { ControlPanelDropdownRenderer } from "shared/structs/control-panel";
const { ceil, min, huge: INF } = math;
/*
If delta time in the spring class is lower than this value,
it will split up the update into multiple smaller... | 875 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/shared/constants.ts | roblox-ts | .ts | import { ReplicatedFirst, RunService as Runtime } from "@rbxts/services";
import Object from "@rbxts/object-utils";
import Signal from "@rbxts/signal";
enum DevID {
Runic = 44966864
}
const DEVELOPERS = new Set(Object.values(DevID)); // add extra developer user IDs here
export function isDeveloper(player: Player):... | 118 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/shared/data-models/player-data.ts | roblox-ts | .ts | import type { DataType } from "@rbxts/flamework-binary-serializer";
export const INITIAL_GLOBAL_DATA: GlobalData = {
};
export interface GlobalData {
}
export const INITIAL_DATA: PlayerData = {
coins: 0,
purchaseHistory: []
};
export interface PlayerData {
readonly coins: DataType.u32;
readonly purchaseHi... | 75 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/shared/decorators.ts | roblox-ts | .ts | import { Modding, Reflect } from "@flamework/core";
import { RunService as Runtime } from "@rbxts/services";
import { roundDecimal } from "./utility/numbers";
import Log from "./log";
/**
* Request the required metadata for lifecycle events and dependency resolution.
* @metadata flamework:implements flamework:param... | 1,320 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/shared/iris-utility.ts | roblox-ts | .ts | import Wave from "@rbxts/wave";
import Iris from "@rbxts/iris";
export function createWaveTree(wave: Wave, name = "Wave"): Wave {
let resultWave = wave;
Iris.Tree([name]);
{
const useSin = Iris.Checkbox(["Is Sine Wave?"], { isChecked: Iris.State(wave.waveFunction === math.sin) });
const amplitude = Iris... | 504 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/shared/log.ts | roblox-ts | .ts | import { BaseComponent } from "@flamework/components";
import { RunService as Runtime, Players } from "@rbxts/services";
import { Logger, OutputStream } from "@rbxts/ez-log";
import { getName } from "@rbxts/flamework-meta-utils";
function getInstancePath(instance: Instance): string {
let path = instance.GetFullName(... | 351 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/shared/network.ts | roblox-ts | .ts | import { Networking } from "@flamework/networking";
import { createBinarySerializer } from "@rbxts/flamework-binary-serializer";
import type { PlayerData } from "./data-models/player-data";
import type { AudioPacket } from "./structs/packets";
import type { ReplicationOptions } from "./classes/replicable";
type Seria... | 260 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/shared/utility/meta.ts | roblox-ts | .ts | import { Modding } from "@flamework/core";
import { t } from "@rbxts/t";
/** @hidden */
function _getInstanceAtPath([paths]: string[][]): Maybe<Instance> {
let instance: Maybe<Instance> = game;
for (const path of paths) {
if (instance === undefined) break;
instance = instance.FindFirstChild(path);
}
... | 366 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/tests/meta-utility/safe-cast-test.ts | roblox-ts | .ts | import { Modding } from "@flamework/core";
import { Fact, Assert } from "@rbxts/runit";
import { t } from "@rbxts/t";
import { safeCast } from "shared/utility/meta";
interface Foo {
readonly foo: number;
}
class SafeCastTest {
@Fact
public generatesTypeGuard(): void {
this.checkFoo();
}
@Fact
public... | 226 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/tests/number-utility-test.ts | roblox-ts | .ts | import { Theory, InlineData, Assert } from "@rbxts/runit";
import { doubleSidedLimit, roundDecimal, toNearestFiveOrTen, zeroIfClose } from "shared/utility/numbers";
class NumberUtilityTest {
@Theory
@InlineData(69, 10)
@InlineData(-69, -10)
public limitsNumberOnBothSigns(input: number, expected: number): void... | 335 |
LDGerrits/rogen | LDGerrits-rogen-f150801/src/config.ts | roblox-ts | .ts | import fs from "fs";
import path from "path";
import { Environment, Config, Mode, RojoTree, RojoNode } from "./types.js";
import { defaultConfig, defaultProject } from "./constants.js";
import { Logger } from "./logger.js";
type ConfigKeys = keyof {
[K in keyof Config as string extends K
? never
: number extends ... | 3,478 |
LDGerrits/rogen | LDGerrits-rogen-f150801/src/constants.ts | roblox-ts | .ts | import { RoutingMaps } from "./route.js";
import { Config, RojoTree } from "./types.js";
export const version = "1.4.4";
export const dataExtensions = new Set([
".csv",
".txt",
".json",
".toml",
".yaml",
".yml",
".msgpack",
".md",
]);
export const defaultProject: RojoTree = {
name: "roblox-game",
tree: { $... | 863 |
osyrisrblx/rbxts-build | osyrisrblx-rbxts-build-4f8b7e9/scripts/model_export.luau | luau | .luau | local fs = require("@lune/fs")
local roblox = require("@lune/roblox")
local process = require("@lune/process")
local placePath = process.args[1]
local game = roblox.deserializePlace(fs.readFile(placePath))
local Workspace = game:GetService("Workspace")
for _, folder in Workspace:GetChildren() do
if folder.ClassN... | 158 |
osyrisrblx/rbxts-build | osyrisrblx-rbxts-build-4f8b7e9/scripts/model_import.luau | luau | .luau | -- luacheck: globals Instance
local fs = require("@lune/fs")
local roblox = require("@lune/roblox")
local process = require("@lune/process")
local Instance = roblox.Instance
local game = Instance.new("DataModel")
local Workspace = game:GetService("Workspace")
local args = table.clone(process.args)
local placePath =... | 150 |
osyrisrblx/rbxts-build | osyrisrblx-rbxts-build-4f8b7e9/scripts/sync.luau | luau | .luau | local fs = require("@lune/fs")
local roblox = require("@lune/roblox")
local process = require("@lune/process")
local placeFilePath = process.args[1]
local outPath = process.args[2]
local game = roblox.deserializePlace(fs.readFile(placeFilePath))
local SERVICE_BLACKLIST = {
StarterPlayer = true,
}
local output = ""... | 485 |
roblox-aurora/rbxts-transform-debug | roblox-aurora-rbxts-transform-debug-9cc03b5/src/class/symbolProvider.ts | roblox-ts | .ts | import path from "path";
import ts from "typescript";
import { TransformState } from "./transformState";
import fs from "fs";
import { isPathDescendantOf } from "../util/isPathDescendantOf";
import assert from "assert";
export const moduleResolutionCache = new Map<string, string | false>();
class FileSymbol {
privat... | 885 |
daimond113/rbxts-transformer-jecs | daimond113-rbxts-transformer-jecs-e89f5c9/src/index.ts | roblox-ts | .ts | import ts from "typescript"
import { type Config, TransformState } from "./transforms/index.js"
import { transformFile } from "./transforms/file.js"
const transformer: (
program: ts.Program,
config?: Partial<Config> & { resolutionHost?: ts.ModuleResolutionHost },
) => ts.TransformerFactory<ts.SourceFile> = (program,... | 154 |
daimond113/rbxts-transformer-jecs | daimond113-rbxts-transformer-jecs-e89f5c9/test/index.ts | roblox-ts | .ts | /// <reference types="vite/client" />
import { VirtualProject } from "roblox-ts"
import transformer from "../src/index.js"
import { resolve } from "path/posix"
export const compile = async (source: string): Promise<string> => {
const project = new VirtualProject()
project.tsTransformers.push((program) =>
transform... | 458 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/benchmark/benchmark.lua | luau | .lua | -- ROBLOX no upstream
--[[
ROBLOX note:
custom implementation for BenchmarkJS
only supporting necessary features
]]
local rootWorkspace = script.Parent.Parent
local LuauPolyfill = require(rootWorkspace.LuauPolyfill)
local Object = LuauPolyfill.Object
type Function = (...any) -> ...any
type Array<T> = Luau... | 1,337 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/benchmark/calculateStats.lua | luau | .lua | -- ROBLOX no upstream
local rootWorkspace = script.Parent.Parent
local LuauPolyfill = require(rootWorkspace.LuauPolyfill)
local Array = LuauPolyfill.Array
local Boolean = LuauPolyfill.Boolean
type Array<T> = { [number]: T }
export type Stats = {
min: number,
max: number,
mean: number,
variance: number,
sd: numbe... | 888 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/bin/benchmark.lua | luau | .lua | local Root = script.Parent.ApolloClientBenchmarkModel
local ProcessService = game:GetService("ProcessService")
local Packages = Root.Packages
local benchmark = require(Packages.ApolloClientBenchmarks)
local ok, result = pcall(benchmark)
if not ok then
warn(result)
ProcessService:ExitAsync(1)
else
ProcessService:E... | 83 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/bin/spec.lua | luau | .lua | local Root = game:GetService("ReplicatedStorage")
local Packages = Root.Packages
local runCLI = require(Packages.Dev.Jest).runCLI
local processServiceExists, ProcessService = pcall(function()
return game:GetService("ProcessService")
end)
local status, result = runCLI(Root, {
verbose = _G.verbose == "true",
ci = ... | 189 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/jest.config.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
return {
displayName = "ApolloClientLua",
testMatch = { "**/*.spec" },
setupFiles = { script.Parent.config.jest.setup },
}
| 70 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/jsutils/equal.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
local srcWorkspace = script.Parent.Parent
local Packages = srcWorkspace.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Array, Obj... | 463 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/jsutils/typedDocumentNode.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
local srcWorkspace = script.Parent.Parent
local rootWorkspace = srcWorkspace.Parent
local graphQLModule = require(rootWorkspace.GraphQL)
type Docu... | 247 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/luaUtils/Object.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
local rootWorkspace = script.Parent.Parent.Parent
local LuauPolyfill = require(rootWorkspace.LuauPolyfill)
-- ROBLOX TODO: include this in LuauPol... | 156 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/luaUtils/encodeURIComponent.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
local HttpService = game:GetService("HttpService")
-- ROBLOX TODO: include in LuauPolyfill
local function encodeURIComponent(value: string): strin... | 204 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/luaUtils/hasOwnProperty.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
local function hasOwnProperty(obj: { [any]: any }, prop: string | number): boolean
return obj[prop] ~= nil
end
return hasOwnProperty
| 72 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/luaUtils/init.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
local rootWorkspace = script.Parent.Parent
local LuauPolyfill = require(rootWorkspace.LuauPolyfill)
local Object = LuauPolyfill.Object
local makeI... | 98 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/luaUtils/makeIntervalImpl.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX TODO: move this to LuauPolyfill
local Status = newproxy(false)
type Status = typeof(Status)
type TaskStatus = number
type Task = { [Stat... | 315 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/luaUtils/objectKeysForEach.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
return function<T, U>(obj: { [T]: U }, callback: (T) -> ())
for key, _ in obj do
callback(key)
end
end
| 76 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/luaUtils/sortedEncode.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
local rootWorkspace = script.Parent.Parent.Parent
local LuauPolyfill = require(rootWorkspace.LuauPolyfill)
local Array = LuauPolyfill.Array
local ... | 195 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/luaUtils/stringIndexOf.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX comment: no upstream
-- ROBLOX TODO: replace when added to LuauPolyfill
local exports = {}
local function stringIndexOf(s: string, subst... | 124 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/optimism/anyEntryTypes.lua | luau | .lua | --[[
* Copyright (c) 2016 Ben Newman
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX no upstream, extracted from optimism/entry.ts to work around circular types/deps
local srcWorkspace = script.Parent.Parent
local rootWorksp... | 585 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/optimism/depTypes.lua | luau | .lua | --[[
* Copyright (c) 2016 Ben Newman
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX no upstream
local srcWorkspace = script.Parent.Parent
local rootWorkspace = srcWorkspace.Parent
local LuauPolyfill = require(rootWorkspace.L... | 226 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/optimism/entryTypes.lua | luau | .lua | --[[
* Copyright (c) 2016 Ben Newman
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX no upstream
local srcWorkspace = script.Parent.Parent
local rootWorkspace = srcWorkspace.Parent
local depTypesModule = require(script.Pare... | 575 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/utilities/common/global.lua | luau | .lua | --[[
* Copyright (c) 2021 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX deviation: this was to support webpack logic, logic which is needed in luau
local exports ... | 187 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/utilities/common/maybe.lua | luau | .lua | --[[
* Copyright (c) 2021 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX deviation: this was to support webpack logic, logic which is needed in luau
local exports ... | 181 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/utilities/globals/null.lua | luau | .lua | --[[
* Copyright (c) 2021 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
local srcWorkspace = script.Parent.Parent.Parent
local rootWorkspace = srcWorkspace.Parent
local Lu... | 140 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/utilities/graphql/types.lua | luau | .lua | --[[
* Copyright (c) 2021 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX note: extracted from storeUtils to break circular dependencies
-- policies_types.lua:55:28... | 363 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/wry/context/init.lua | luau | .lua | --[[
* Copyright (c) 2019-2021 Ben Newman <ben@eloper.dev>
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX no upstream
local contextModule = require(script.context)
export type Slot<T> = contextModule.Slot<T>
return context... | 82 |
Roblox/apollo-client-lua | Roblox-apollo-client-lua-67fa992/src/wry/trie/init.lua | luau | .lua | --[[
* Copyright (c) 2019-2021 Ben Newman <ben@eloper.dev>
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX no upstream
local trieModule = require(script.trie)
export type Trie<Data> = trieModule.Trie<Data>
return trieModul... | 83 |
Dionysusnu/rbxts-rust-classes | Dionysusnu-rbxts-rust-classes-341fcc3/tests/src/main.server.ts | roblox-ts | .ts | import type TestEZType from "@rbxts/testez";
const TestEZ = require(game.GetService("ReplicatedStorage").include.node_modules["@rbxts"].testez.src) as TestEZType;
const results = TestEZ.TestBootstrap.run([game.GetService("ServerScriptService").tests]);
if (results.errors.size() > 0 || results.failureCount > 0) {
error... | 84 |
R-unic/mechanism | R-unic-mechanism-39b6a97/src/axis-action.ts | roblox-ts | .ts | import Signal from "@rbxts/lemon-signal";
import { BaseAction } from "./base-action";
import { getRawInput, type RawInput } from "./common";
export abstract class AxisAction extends BaseAction {
public readonly updated = this.trash.add(new Signal);
public readonly axes: RawInput[];
public readonly delta = new V... | 291 |
R-unic/mechanism | R-unic-mechanism-39b6a97/src/base-action.ts | roblox-ts | .ts | import { BaseID } from "@rbxts/id";
import Destroyable from "@rbxts/destroyable";
export abstract class BaseAction extends Destroyable implements BaseID<string | number> {
public readonly id: string | number = "default";
public readonly processed: boolean = false;
public readonly callbacks: Callback[] = [];
/... | 92 |
R-unic/mechanism | R-unic-mechanism-39b6a97/src/input-manager.ts | roblox-ts | .ts | import { UserInputService as InputService } from "@rbxts/services";
import Destroyable from "@rbxts/destroyable";
import { BaseAction } from "./base-action";
import { AxisAction } from "./axis-action";
import { gamepadInputs } from "./common";
type Maybe<T> = T | undefined;
type AbstractConstructor<T = object> = abst... | 568 |
R-unic/mechanism | R-unic-mechanism-39b6a97/src/standard-action.ts | roblox-ts | .ts | import Signal from "@rbxts/lemon-signal";
import { BaseAction } from "./base-action";
import { getInputEnum, type RawInput } from "./common";
export abstract class BaseStandardAction extends BaseAction {
public readonly activated = this.trash.add(new Signal);
public readonly deactivated = this.trash.add(new Signa... | 764 |
fisherjacobc/rbxts-transformer-web2rblx | fisherjacobc-rbxts-transformer-web2rblx-0dae6ad/src/transformer.ts | roblox-ts | .ts | import * as fs from "node:fs";
// import * as path from "path";
import ts from "typescript";
import parseCss from "./parseCss";
/**
* This is the transformer's configuration, the values are passed from the tsconfig.
*/
export interface TransformerConfig {
cssFilePath: string;
}
enum RobloxEquivelantTags {
body = ... | 10,077 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Contexts/DateTime.luau | luau | .luau | --!native
--!optimize 2
--!strict
--[[
MIT License
Copyright (c) 2024 BusyCityGuy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to ... | 403 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Contexts/Debug.luau | luau | .luau | --!native
--!optimize 2
--!strict
--[[
MIT License
Copyright (c) 2024 BusyCityGuy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to ... | 398 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Contexts/Random.luau | luau | .luau | --!optimize 2
--!strict
-- TODO: Reimplement actual Random library
export type PolyfillRandom = {
NextInteger: (self: PolyfillRandom, minimum: number, maximum: number) -> number,
}
type Static = {
new: (seed: number?) -> PolyfillRandom,
}
local Random = {} :: PolyfillRandom & Static;
(Random :: any).__index = Rand... | 143 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Contexts/Utf8.luau | luau | .luau | --!native
--!optimize 2
--!strict
local LunePolyfill = require("@packages/LunePolyfill")
local Utf8 = setmetatable({
graphemes = LunePolyfill.Utf8.Graphemes;
}, {__index = utf8})
return Utf8
| 60 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/Debug.luau | luau | .luau | --!optimize 2
--!nonstrict
local TypeOf = require("@packages/TypeOf")
local Debug = {}
local TAB = "\t"
type GenericDictionary = {[string]: any}
type GenericTable = {[any]: any}
local Debug_Inspect: (...any) -> string
local REPLACERS = {
["Index ?"] = "__index";
["Newindex ?"] = "__newindex";
}
local function G... | 2,642 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/GreenTea/init.luau | luau | .luau | --!optimize 2
--!strict
local GreenTea = require("./GreenTea")
local tCompat = require("./tCompat")
export type Cause = GreenTea.Cause
export type Type = GreenTea.Type
export type TuplePacked<T...> = GreenTea.TuplePacked<T...>
local export = {}
export.t = tCompat
export.isGreenTeaType = GreenTea.isGreenTeaType
exp... | 591 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/GreenTea/tCompat.luau | luau | .luau | --!optimize 2
--!strict
local GreenTea = require("./GreenTea")
local t = {}
type Typechecker = (...any) -> (boolean, any?)
type TypecheckerConstr<T... = ()> = (T...) -> Typechecker
local function asPlainFn(fn: (...any) -> ...any): Typechecker
return function()
return fn()
end
end
local function asGreenTeaType... | 2,380 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/GreenTeaUtilities/EasyLiteral.luau | luau | .luau | --!optimize 2
--!strict
local GreenTea = require("../GreenTea")
local function EasyLiteral<T>(...: any)
local count = select("#", ...)
local array = table.create(count)
for index = 1, count do
local value = select(index, ...)
array[index] = GreenTea.literal(value)
end
return GreenTea.union(table.unpack(arr... | 93 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/GreenTeaUtilities/IntersectionPlus.luau | luau | .luau | --!optimize 2
--!strict
local GreenTea = require("../GreenTea")
type IntersectionType =
(<T1, T2>(T1, T2) -> T1 & T2)
& (<T1, T2, T3>(T1, T2, T3) -> T1 & T2 & T3)
& (<T1, T2, T3, T4>(T1, T2, T3, T4) -> T1 & T2 & T3 & T4)
& (<T1, T2, T3, T4, T5>(T1, T2, T3, T4, T5) -> T1 & T2 & T3 & T4 & T5)
& (<T1, T2, T3, T4, T... | 596 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/GreenTeaUtilities/UnionPlus.luau | luau | .luau | --!optimize 2
--!strict
local GreenTea = require("../GreenTea")
type UnionType =
(<T1, T2>(T1, T2) -> T1 | T2)
& (<T1, T2, T3>(T1, T2, T3) -> T1 | T2 | T3)
& (<T1, T2, T3, T4>(T1, T2, T3, T4) -> T1 | T2 | T3 | T4)
& (<T1, T2, T3, T4, T5>(T1, T2, T3, T4, T5) -> T1 | T2 | T3 | T4 | T5)
& (<T1, T2, T3, T4, T5, T6>(... | 596 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/GreenTeaUtilities/init.luau | luau | .luau | --!optimize 2
--!strict
local EasyLiteral = require("./EasyLiteral")
local IntersectionPlus = require("./IntersectionPlus")
local UnionPlus = require("./UnionPlus")
local GreenTeaUtilities = table.freeze({
EasyLiteral = EasyLiteral;
Intersection = IntersectionPlus;
IntersectionPlus = IntersectionPlus;
Union = Uni... | 86 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauDisk/init.luau | luau | .luau | local setType = require("./set/type")
export type Set<T> = setType.Set<T>
local Disk = {
Array = {
all = require("./array/all");
alternate = require("./array/alternate");
any = require("./array/any");
average = require("./array/average");
averageBy = require("./array/averageBy");
concat = require("./arra... | 638 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauPath/Prefix.luau | luau | .luau | --!nolint LocalShadow
--!optimize 2
export type PrefixEnum =
{type: "Verbatim", value: string}
| {type: "VerbatimUNC", hostName: string, shareName: string}
| {type: "VerbatimDisk", value: string}
| {type: "DeviceNS", value: string}
| {type: "UNC", hostName: string, shareName: string}
| {type: "Disk", value: stri... | 1,135 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauPath/Rev.luau | luau | .luau | --!nolint LocalShadow
--!optimize 2
local Disk = require("@packages/LuauDisk")
local Array = Disk.Array
export type Rev<T> = {
next: (self: Rev<T>) -> T?,
collect: (self: Rev<T>) -> {T},
rev: (self: Rev<T>) -> Rev<T>,
-- DoubleEndedIterator
nextBack: (self: Rev<T>) -> T?,
clone: (self: Rev<T>) -> Rev<T>,
}
t... | 525 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauPath/init.luau | luau | .luau | --!optimize 2
local Path = require("./Path")
type PrefixEnum =
{type: "Verbatim", value: string}
| {type: "VerbatimUNC", hostName: string, shareName: string}
| {type: "VerbatimDisk", value: string}
| {type: "DeviceNS", value: string}
| {type: "UNC", hostName: string, shareName: string}
| {type: "Disk", value: s... | 1,136 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauPath/sys/path/PrefixParser.luau | luau | .luau | --!nolint LocalShadow
--!optimize 2
local PrefixParserSlice = require("./PrefixParserSlice")
type PrefixParserSlice = PrefixParserSlice.PrefixParserSlice
export type PrefixParser = {
asSlice: (self: PrefixParser) -> PrefixParserSlice,
}
type Private = {
_path: string,
_prefix: string,
_length: number,
}
type Pr... | 313 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauPath/sys/path/PrefixParserSlice.luau | luau | .luau | --!nolint LocalShadow
--!optimize 2
export type PrefixParserSlice = {
stripPrefix: (self: PrefixParserSlice, prefix: string) -> PrefixParserSlice?,
prefixBytes: (self: PrefixParserSlice) -> string,
finish: (self: PrefixParserSlice) -> string,
}
type Private = {
_path: string,
_prefix: string,
_index: number,
}
... | 417 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauPath/sys/path/init.luau | luau | .luau | --!nolint LocalShadow
--!optimize 2
local Prefix = require("../../Prefix")
local parsePrefixWindows = require("./parsePrefix")
type Prefix = Prefix.Prefix
local MAIN_SEPARATOR_STR = if _G.SYS_PATH_SEPARATOR == "\\" or _G.SYS_PATH_SEPARATOR == "/"
then _G.SYS_PATH_SEPARATOR
elseif _G.LUA_ENV == "lune" and (require ... | 323 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauPolyfill/AssertionError/init.luau | luau | .luau | --!native
--!optimize 2
--!strict
local AssertionErrorModule = require("./AssertionErrorGlobal")
export type AssertionError = AssertionErrorModule.AssertionError
return AssertionErrorModule.AssertionError
| 41 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauPolyfill/Boolean/init.luau | luau | .luau | --!native
--!optimize 2
--!strict
return {
toJSBoolean = require("./toJSBoolean");
}
| 27 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauPolyfill/Boolean/toJSBoolean.luau | luau | .luau | --!native
--!optimize 2
--!strict
local Number = require("../Number")
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
return function(val: any): boolean
return not not val and val ~= 0 and val ~= "" and not Number.isNaN(val)
end
| 72 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/LuauPolyfill/Collections/Array/concat.luau | luau | .luau | --!native
--!optimize 2
--!strict
local isArray = require("./isArray")
local types = require("../../ES7Types")
local __DEV__ = _G.__DEV__
type Array<T> = types.Array<T>
local RECEIVED_OBJECT_ERROR = "Array.concat(...) only works with array-like tables but "
.. "it received an object-like table.\nYou can avoid this e... | 447 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.