repo stringclasses 302
values | file_path stringlengths 18 241 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 76 697k | tokens int64 10 271k |
|---|---|---|---|---|---|
DiscordLuau/discord-luau | DiscordLuau-discord-luau-d5a231e/packages/utilities/src/validateKebabCase.luau | luau | .luau | --[=[
@function Utilities.validateKebabCase
@within Utilities
Will validate a string to ensure that it's kebab-case, discord is sometimes very specific about the casing of
text.
Will return either true/false, will not error.
@return thread
]=]
return function(source: string)
if source == "" then
return fals... | 173 |
DiscordLuau/discord-luau | DiscordLuau-discord-luau-d5a231e/packages/voice/src/init.luau | luau | .luau | --[=[
@class Voice
@unreleased
Interface for the discord-luau Voice package
]=]
return {}
| 26 |
DiscordLuau/discord-luau | DiscordLuau-discord-luau-d5a231e/packages/websocket/src/init.luau | luau | .luau | local manager = require("@self/manager")
local shard = require("@self/shard")
export type Manager = manager.Manager
--[=[
@class WebSocket
Interface for the discord-luau WebSocket package
]=]
return {
--[=[
@prop manager WebSocket.Manager
@within WebSocket
]=]
manager = manager,
--[=[
@prop shard Web... | 97 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/editors/code/src/definitions.ts | roblox-ts | .ts | import * as vscode from "vscode";
import * as utils from "./utils";
import path from "path";
export const isExternalFile = (path: string) => {
return path.startsWith("http://") || path.startsWith("https://");
};
export const outputLocationForDefinition = (
context: vscode.ExtensionContext,
packageName: string,
... | 580 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/editors/code/src/extension.ts | roblox-ts | .ts | import * as vscode from "vscode";
import * as os from "os";
import { fetch } from "undici";
import {
CloseAction,
CloseHandlerResult,
ErrorAction,
ErrorHandler,
ErrorHandlerResult,
Executable,
LanguageClient,
LanguageClientOptions,
Message,
ServerOptions,
TransportKind,
} from "vscode-languageclie... | 4,445 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/editors/code/src/onTypeFormattingMiddleware.ts | roblox-ts | .ts | import * as vscode from "vscode";
import { ProvideOnTypeFormattingEditsSignature } from "vscode-languageclient";
export function isQuoteConversionEdit(edits: vscode.TextEdit[]): boolean {
return edits.some((edit) => edit.newText === "`");
}
export function shouldHandleQuoteConversion(
edits: vscode.TextEdit[] | n... | 369 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/editors/code/src/test/helper.ts | roblox-ts | .ts | /* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ----------------------------------------------------------------... | 316 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/editors/code/src/utils.ts | roblox-ts | .ts | import * as vscode from "vscode";
import * as path from "path";
import * as os from "os";
export const basenameUri = (uri: vscode.Uri): string => {
return path.basename(uri.fsPath);
};
export const exists = (uri: vscode.Uri): Thenable<boolean> => {
return vscode.workspace.fs.stat(uri).then(
() => true,
()... | 185 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/plugin/cloud/publishing_task.luau | luau | .luau | --!strict
--- Script to publish the Luau Language Server companion plugin to Roblox
local AssetService = game:GetService("AssetService")
local ASSET_ID = 10913122509
local CREATOR_ID = 68136726
print("Executing AssetService:CreateAssetVersionAsync")
local result, number =
AssetService:CreateAssetVersionAsync(game.... | 108 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/plugin/src/Assets.luau | luau | .luau | --!strict
--- Asset IDs for images used in the plugin's toolbar and UI.
--- These are Roblox asset IDs pointing to uploaded images.
local Assets = {}
--- Default icon
Assets.Icon = "rbxassetid://85321628471210"
--- Icon with a green square indicating connection
Assets.ConnectedIcon = "rbxassetid://126078034992458"
... | 108 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/plugin/src/InstanceTracker.luau | luau | .luau | --!strict
--- Tracks changes to Roblox Instances and notifies listeners with filtering based on include paths.
--- Monitors name and parent property changes, as well as new descendants.
--- Encodes Roblox Instances into a serializable format for the language server.
local Log = require(script.Parent.Utils.Log)
local ... | 1,515 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/plugin/src/Settings/DefaultSettings.luau | luau | .luau | --- Configuration for the Luau Language Server
--- https://devforum.roblox.com/t/luau-language-server-for-external-editors/2185389
--- Make sure that `luau-lsp.plugin.enabled` is set to `true` in VSCode for the plugin to connect
return {
--- The host to connect to the language server.
host = "http://localhost",
--... | 342 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/plugin/src/Utils/Debounce.luau | luau | .luau | --!strict
--- Debounce utility for rate-limiting function calls.
--- Delays callback execution until a period of inactivity.
---
--- Usage:
--- ```lua
--- local debounce = Debounce.new(0.5, function()
--- print("Called after 0.5s of inactivity")
--- end)
--- debounce:call() -- Starts/resets the timer
--- debounce:... | 454 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/plugin/src/Utils/Log.luau | luau | .luau | --!strict
--- Logging utility for the Luau Language Server plugin.
--- Provides leveled logging with configurable output filtering.
---
--- Usage:
--- ```lua
--- Log.setLevel(Log.Level.DEBUG)
--- Log.info("Connected to server")
--- Log.debug("Processing", itemCount, "items")
--- ```
local Log = {}
--- Numeric log le... | 683 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/plugin/src/Utils/Signal.luau | luau | .luau | --!strict
--- A dead simple strictly typed signal/event utility for managing listeners.
--- Provides a reusable pattern for registering callbacks and firing events.
---
--- Usage:
--- ```lua
--- local signal = Signal.new()
--- local disconnect = signal:connect(function(value)
--- print("Received:", value)
--- end)... | 486 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/scripts/remodel.d.lua | luau | .lua | declare class RemodelInstance
Name: string
ClassName: string
Parent: RemodelInstance
function Destroy(self): ()
function Clone(self): RemodelInstance
function GetChildren(self): { RemodelInstance }
function GetDescendants(self): { RemodelInstance }
function FindFirstChild(self, name: string): RemodelInstance?
e... | 481 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/tests/testdata/bad_standard_definitions.d.luau | luau | .luau | --#METADATA#{}
declare class Object
end
declare class Instance
end
declare class ServiceProvider
end
declare class Enum
end
declare class EnumItem
end | 36 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/tests/testdata/extra_definitions_relying_on_mutations.d.luau | luau | .luau | --#METADATA#{"CREATABLE_INSTANCES":[], "SERVICES": []}
export type ExtraDataRelyingOnMutations = {
RigType: Enum.HumanoidRigType,
}
| 44 |
JohnnyMorganz/luau-lsp | JohnnyMorganz-luau-lsp-76ede66/tests/testdata/standard_definitions.d.luau | luau | .luau | --#METADATA#{"CREATABLE_INSTANCES":["TextLabel","Part"], "SERVICES": ["ReplicatedStorage","ServerScriptService","Workspace"]}
declare class Enum
function GetEnumItems(self): { any }
end
declare class EnumItem
Name: string
Value: number
EnumType: Enum
function IsA(self, enumName: string): boolean
en... | 1,015 |
Roblox/react-luau | Roblox-react-luau-a62f471/WorkspaceStatic/jest.config.lua | luau | .lua | local Workspace = script.Parent
-- In case we need to specify a custom testSetupFile for a project, we need to do that in in a separate jest.config.lua file that's in the project's root folder.
-- Therefore we specify the project here and provide it to the "projects" field in this config file.
-- We also need to add t... | 213 |
Roblox/react-luau | Roblox-react-luau-a62f471/WorkspaceStatic/jest/matchers/toErrorDev.lua | luau | .lua | local createConsoleMatcher = require(script.Parent.createConsoleMatcher)
return createConsoleMatcher("error", "toErrorDev")
| 24 |
Roblox/react-luau | Roblox-react-luau-a62f471/WorkspaceStatic/jest/matchers/toLogDev.lua | luau | .lua | local createConsoleMatcher = require(script.Parent.createConsoleMatcher)
return createConsoleMatcher("log", "toLogDev")
| 24 |
Roblox/react-luau | Roblox-react-luau-a62f471/WorkspaceStatic/jest/matchers/toWarnDev.lua | luau | .lua | local createConsoleMatcher = require(script.Parent.createConsoleMatcher)
return createConsoleMatcher("warn", "toWarnDev")
| 24 |
Roblox/react-luau | Roblox-react-luau-a62f471/bin/run-deep-tree-benchmark.lua | luau | .lua | local Packages = script.Parent.RoactAlignment
local RotrieverWorkspace = Packages._Workspace
local Roact = require(RotrieverWorkspace.React.React)
local ReactRoblox = require(RotrieverWorkspace.ReactRoblox.ReactRoblox)
local config = {}
if _G.minSamples ~= nil then
config.sampleCount = tonumber(_G.minSamples)
end
r... | 106 |
Roblox/react-luau | Roblox-react-luau-a62f471/bin/run-first-render-benchmark.lua | luau | .lua | local Packages = script.Parent.RoactAlignment
local RotrieverWorkspace = Packages._Workspace
local Roact = require(RotrieverWorkspace.React.React)
local ReactRoblox = require(RotrieverWorkspace.ReactRoblox.ReactRoblox)
local Scheduler = require(RotrieverWorkspace.Scheduler.Scheduler)
local firstRenderBenchmark =
requ... | 135 |
Roblox/react-luau | Roblox-react-luau-a62f471/bin/run-frame-rate-benchmark.lua | luau | .lua | local Packages = script.Parent.RoactAlignment
local RotrieverWorkspace = Packages._Workspace
local Roact = require(RotrieverWorkspace.React.React)
local ReactRoblox = require(RotrieverWorkspace.ReactRoblox.ReactRoblox)
local Scheduler = require(RotrieverWorkspace.Scheduler.Scheduler)
local frameRateBenchmark =
requir... | 135 |
Roblox/react-luau | Roblox-react-luau-a62f471/bin/run-sierpinski-triangle-benchmark.lua | luau | .lua | local Packages = script.Parent.RoactAlignment
local RotrieverWorkspace = Packages._Workspace
local Roact = require(RotrieverWorkspace.React.React)
local ReactRoblox = require(RotrieverWorkspace.ReactRoblox.ReactRoblox)
local sierpinskiTriangleBenchmark = require(
RotrieverWorkspace.React.Dev.PerformanceBenchmarks
).s... | 127 |
Roblox/react-luau | Roblox-react-luau-a62f471/bin/run-wide-tree-benchmark.lua | luau | .lua | local Packages = script.Parent.RoactAlignment
local RotrieverWorkspace = Packages._Workspace
local Roact = require(RotrieverWorkspace.React.React)
local ReactRoblox = require(RotrieverWorkspace.ReactRoblox.ReactRoblox)
local wideTreeBenchmark =
require(RotrieverWorkspace.React.Dev.PerformanceBenchmarks).wideTreeBench... | 112 |
Roblox/react-luau | Roblox-react-luau-a62f471/bin/spec.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 328 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/example-app/StarterScript.lua | luau | .lua | local CorePackages = game:GetService("CorePackages")
local RunService = game:GetService("RunService")
if RunService:IsServer() then
return
end
-- Set global flags and initialize devtools before React is ever used
local ReactGlobals = require(CorePackages.ReactGlobals)
ReactGlobals.__DEV__ = true
ReactGlobals.__PROFI... | 105 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-core/src/utils/serializeTable.lua | luau | .lua | local HttpService = game:GetService("HttpService")
type Record = { [string]: any }
local ENCODE_TO_NULL = newproxy()
--- Serializes a table such that it can be encoded as JSON via HttpService.
local function serializeTable(tbl: Record): Record
local seen = {}
local function visitPropsRecursive(parent: Record): an... | 1,080 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-extensions/src/init.lua | luau | .lua | -- ROBLOX note: no upstream
-- ROBLOX note: The setup function adds the glue required for DeveloperTools to initialize the Roact devtools correctly
local Packages = script.Parent
return {
setup = function(debugMode: boolean)
local ReactGlobals = require(Packages.ReactGlobals)
-- ROBLOX note: Set globals for Reac... | 540 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/backend/views/Highlighter/Overlay/OverlayRect.lua | luau | .lua | local OverlayRect = {}
OverlayRect.__index = OverlayRect
function OverlayRect.new(container: GuiBase2d)
local self = setmetatable({}, OverlayRect)
self.container = container
local node = Instance.new("Frame")
node.Name = "OverlayRect"
node.BackgroundTransparency = 1
node.Parent = container
self.node = node
l... | 488 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/backend/views/Highlighter/Overlay/OverlayTip.lua | luau | .lua | type Box = { top: number, left: number, width: number, height: number }
local function calculatePosition(dims: Box, bounds: Box, size: Vector2)
local tipHeight = math.max(size.Y, 20)
local tipWidth = math.max(size.X, 60)
local margin = 5
local top: number
if dims.top + dims.height + tipHeight <= bounds.top + bou... | 1,016 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/clipboardjs.mock.lua | luau | .lua | -- ROBLOX TODO: stub for clipboardjs, remove when we know how we'll handle its intent in a Roblox way
return {}
| 30 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/devtools/ProfilerStore.lua | luau | .lua | --!strict
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
]]
local Packages = script.Parent.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Arr... | 2,912 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/devtools/ProfilingCache.lua | luau | .lua | --!strict
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
]]
local Packages = script.Parent.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Arra... | 1,104 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/devtools/init.lua | luau | .lua | return {
utils = require(script.utils),
store = require(script.store),
cache = require(script.cache),
devtools = {
Components = {
views = {
types = require(script.views.Components.types),
},
},
},
}
| 52 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/devtools/types.lua | luau | .lua | --!strict
local Packages = script.Parent.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
type Array<T> = LuauPolyfill.Array<T>
type Map<K, V> = LuauPolyfill.Map<K, V>
type Object = LuauPolyfill.Object
type Set<K> = LuauPolyfill.Set<K>
local ComponentsTypes = require(script.Parent.Parent.devtools.vie... | 2,556 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/devtools/views/Profiler/FlamegraphChartBuilder.lua | luau | .lua | --!strict
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
]]
local Packages = script.Parent.Parent.Parent.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfi... | 1,718 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/devtools/views/Profiler/InteractionsChartBuilder.lua | luau | .lua | --!strict
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
]]
local Packages = script.Parent.Parent.Parent.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfi... | 545 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/devtools/views/Profiler/RankedChartBuilder.lua | luau | .lua | --!strict
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
]]
local Packages = script.Parent.Parent.Parent.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfi... | 986 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/devtools/views/Profiler/utils.lua | luau | .lua | --!strict
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
]]
local Packages = script.Parent.Parent.Parent.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfi... | 2,487 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/init.lua | luau | .lua | -- ROBLOX note: upstream doesn't have a root index.js, we may want to contribute a proper contract upstream
local Bridge = require(script.bridge)
local Types = require(script.types)
local Backend = require(script.backend)
export type BackendBridge = Bridge.BackendBridge
export type ComponentFilter = Types.ComponentFi... | 132 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-shared/src/jest.config.lua | luau | .lua | return {
setupFilesAfterEnv = { script.Parent.__tests__.setupTests },
testMatch = { "**/*.(spec|test)" },
}
| 29 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-devtools-timeline/src/init.lua | luau | .lua | -- ROBLOX note: no upstream
local exports = {}
local constants = require(script.constants)
exports.REACT_TOTAL_NUM_LANES = constants.REACT_TOTAL_NUM_LANES
exports.SCHEDULING_PROFILER_VERSION = constants.SCHEDULING_PROFILER_VERSION
local types = require(script.types)
export type ScrollState = types.ScrollState
export... | 359 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-globals/src/ReactGlobals.global.lua | luau | .lua | -- NOTE: No upstream
--[[
Defines all React globals in a type-safe manner that's scoped to each
copy of React. For backwards compatibility, this module will load the
initial values for each flag from _G. However, this is considered legacy
behavior and new code should import this package and set the fla... | 792 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-globals/src/init.lua | luau | .lua | local ReactGlobals = require(script["ReactGlobals.global"])
return ReactGlobals
| 15 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-reconciler/src/RobloxReactProfiling.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 1,542 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-roblox/src/ReactReconciler.roblox.lua | luau | .lua | --!strict
-- ROBLOX deviation: Initializes the reconciler with this package's host
-- config and returns the resulting module
local Packages = script.Parent.Parent
local initializeReconciler = require(Packages.ReactReconciler)
local ReactRobloxHostConfig = require(script.Parent.client.ReactRobloxHostConfig)
return i... | 79 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-roblox/src/client/roblox/RobloxComponentProps.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 2,699 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-roblox/src/client/roblox/__tests__/waitForEvents.lua | luau | .lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 170 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-telemetry/src/ReactTelemetry.lua | luau | .lua | local Packages = script.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Object = LuauPolyfill.Object
local reportCounter = require(script.Parent.reportCounter)
local customFields = require(script.Parent.customFields)
local ReactTelemetry = {}
ReactTelemetry.customFields = customFields
local ... | 313 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-telemetry/src/customFields.lua | luau | .lua | export type Context = "universal_app" | "in_experience" | "plugin" | "unknown"
export type CustomFields = {
context: Context,
plugin_name: string?,
}
local plugin = script:FindFirstAncestorWhichIsA("Plugin")
local customFields: CustomFields = {
context = if plugin then "plugin" else "unknown",
plugin_name = if pl... | 90 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-telemetry/src/init.lua | luau | .lua | local customFields = require(script.customFields)
export type CustomFields = customFields.CustomFields
return require(script.ReactTelemetry)
| 26 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-telemetry/src/reportCounter.lua | luau | .lua | local TelemetryService = game:GetService("TelemetryService")
local Packages = script.Parent.Parent
local SafeFlags = require(Packages.SafeFlags)
local ReactGlobals = require(Packages.ReactGlobals)
local FFlagReactTelemetryEnabled =
SafeFlags.createGetFFlag("ReactTelemetryEnabled", false)()
export type CounterOption... | 255 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react-test-renderer/src/roblox/RobloxComponentProps.lua | luau | .lua | local Packages = script.Parent.Parent.Parent
local Shared = require(Packages.Shared)
local LuauPolyfill = require(Packages.LuauPolyfill)
type Object = LuauPolyfill.Object
type Array<T> = LuauPolyfill.Array<T>
local Tag = Shared.Tag
local TagManagers = {}
local function setInitialTags(
hostInstance: any,
_tag: st... | 717 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/react/src/ReactBinding.roblox.lua | luau | .lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 1,510 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/roact-compat/src/Portal.lua | luau | .lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 244 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/roact-compat/src/RoactTree.lua | luau | .lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 1,068 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/roact-compat/src/createFragment.lua | luau | .lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 241 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/roact-compat/src/init.lua | luau | .lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 526 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/roact-compat/src/setGlobalConfig.lua | luau | .lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 274 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/roact-compat/src/warnOnce.lua | luau | .lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 243 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/scheduler/src/NoYield.lua | luau | .lua | -- ROBLOX note: no upstream
--!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unles... | 426 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/scheduler/src/unstable_mock.lua | luau | .lua | --!strict
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*]]
local Tracing = require(script.Parent.Tracing)
local TracingSubscriptions = require(script.Parent.TracingSubscriptions)... | 365 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/ErrorHandling.roblox.lua | luau | .lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 1,551 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/PropMarkers/Change.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 338 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/PropMarkers/Event.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 328 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/PropMarkers/Tag.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 179 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/ReactElementType.lua | luau | .lua | --!strict
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
]]
local Packages = script.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
type Object = Luau... | 357 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/ReactFiberHostConfig/init.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 353 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/ReactTypes.lua | luau | .lua | --!strict
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
]]
local Packages = script.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
type Array<T> = L... | 2,197 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/Type.roblox.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 308 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/UninitializedState.roblox.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 343 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/console.lua | luau | .lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 322 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/enqueueTask.roblox.lua | luau | .lua | --!strict
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
]]
local Packages = script.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local setTimeout = Luau... | 109 |
Roblox/react-luau | Roblox-react-luau-a62f471/modules/shared/src/init.lua | luau | .lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 1,505 |
jackdotink/luaup | jackdotink-luaup-aa31fde/bench/init.luau | luau | .luau | local luau = require("@lune/luau")
local fs = require("@lune/fs")
local lossless_source = fs.readFile("lossless/parse.luau")
local lossless_bytecode = luau.compile(lossless_source, {
optimizationLevel = 2,
coverageLevel = 0,
debugLevel = 1,
})
local lossless_bytecode_parser = luau.load(lossless_bytecode, {
codeg... | 822 |
jackdotink/luaup | jackdotink-luaup-aa31fde/lossless/span.luau | luau | .luau | local cst = require("./cst")
local function unreachable(_: never): never
error("unreachable")
end
local span_generic_declaration: (cst.GenericDeclaration) -> cst.Span
local span_generic_declaration_with_defaults: (cst.GenericDeclarationWithDefaults) -> cst.Span
local span_type_arg: (cst.TypeArg) -> cst.Span
local sp... | 3,658 |
jackdotink/luaup | jackdotink-luaup-aa31fde/lossless/visit.luau | luau | .luau | --!optimize 2
--!nolint LocalShadow
local cst = require("./cst")
local function unreachable(_: never): never
error("unreachable")
end
export type Visitor<State> = {
visit_token: (state: State, token: cst.Token) -> (),
visit_generic_declaration: (state: State, node: cst.GenericDeclaration) -> (),
visit_generic_de... | 12,908 |
jackdotink/luaup | jackdotink-luaup-aa31fde/lossy/ast.luau | luau | .luau | --- Stores the locational information of a token or AST node.
---
--- Components:
--- * x: The start index.
--- * y: The end index.
--- * z: Unused.
export type Span = { read x: number, read y: number, read z: number }
--- An identifier or name; such as `foo` or `bar`.
export type AstIdentifier = {
--- The span of t... | 8,442 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/.lune/dev.luau | luau | .luau | local process = require("@lune/process")
local stdio = require("@lune/stdio")
local task = require("@lune/task")
local processes = {}
local COMMANDS = {
"npm run watch",
"rojo sourcemap default.project.json -o sourcemap.json --watch",
"rojo serve",
}
for _, command in COMMANDS do
local args = string.... | 251 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/jest.config.luau | luau | .luau | return {
testMatch = {
"**/__tests__/*.(spec|test)",
},
testPathIgnorePatterns = {
"_Index",
"DevPackages",
},
}
| 41 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/DependencyGraph.luau | luau | .luau | local AdjacencyMatrix = {}
AdjacencyMatrix.__index = AdjacencyMatrix
export type AdjacencyMatrix = {
matrix: { { number } },
length: number,
width: number,
extend: (self: AdjacencyMatrix) -> (),
setEdge: (self: AdjacencyMatrix, i: number, j: number, v: number) -> (),
toAdjacencyList: (self: AdjacencyMatrix) -> ... | 1,203 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/Phase.luau | luau | .luau | --- @class Phase
---
--- Phases represent tags that tell the scheduler when to
--- schedule a set of systems.
local Phase = {}
Phase.__index = Phase
function Phase:__tostring()
return self._name
end
--- @within Phase
---
--- Creates a new Phase, with an optional name to use for debugging.
--- When no name is provide... | 236 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/Pipeline.luau | luau | .luau | --!nonstrict
local DependencyGraph = require(script.Parent.DependencyGraph)
local Phase = require(script.Parent.Phase)
--- @class Pipeline
---
--- Pipelines represent a set of ordered Phases. Systems cannot be
--- assigned to Pipelines themselves, but rather to Phases within
--- those Pipelines.
local Pipeline = {}
Pi... | 518 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/__tests__/InitializerSystems.test.luau | luau | .luau | --!nonstrict
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local root = script.Parent.Parent
local Phase = require(root.Phase)
local Scheduler = require(root.Scheduler)
local JestGlobals = require(ReplicatedStorage.DevPackages.JestGlobals)
local describe = JestGlobals.describe
local expect = JestGl... | 3,868 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/__tests__/Scheduler.test.luau | luau | .luau | --!nonstrict
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local root = script.Parent.Parent
local Phase = require(root.Phase)
local Scheduler = require(root.Scheduler)
local Pipeline = require(root.Pipeline)
local JestGlobals = require(ReplicatedStor... | 2,049 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/__tests__/conditions.test.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local root = script.Parent.Parent
local Scheduler = require(root.Scheduler)
local conditions = require(root.conditions)
local isNot = conditions.isNot
local runOnce = conditions.runOnce
local timePassed = conditions.timePassed
local onEvent = conditions.... | 812 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/__tests__/hooks.test.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local root = script.Parent.Parent
local Phase = require(root.Phase)
local Scheduler = require(root.Scheduler)
local JestGlobals = require(ReplicatedStorage.DevPackages.JestGlobals)
local describe = JestGlobals.describe
local expect = JestGlobals.expect
... | 340 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/__tests__/systems.test.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local root = script.Parent.Parent
local Phase = require(root.Phase)
local Scheduler = require(root.Scheduler)
local JestGlobals = require(ReplicatedStorage.DevPackages.JestGlobals)
local describe = JestGlobals.describe
local expect = JestGlobals.expect
... | 1,137 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/conditions.luau | luau | .luau | local utils = require(script.Parent.utils)
local getConnectFunction = utils.getConnectFunction
type GenericTable = utils.GenericTable
type SignalLike<U...> = utils.SignalLike<U...>
type ConnectionLike = utils.ConnectionLike
type ConnectFn<T, U...> = utils.ConnectFn<T, U...>
type Callback<U...> = utils.Callback<U...>
... | 1,104 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/hooks.luau | luau | .luau | -- Super-duper experimental Plugin Hooks API
local function systemAdd(scheduler, systemInfo)
local hooks = scheduler._hooks[scheduler.Hooks.SystemAdd]
local info = {
scheduler = scheduler,
system = systemInfo,
}
for _, hook in hooks do
local success, err = pcall(hook, info)
if not success then
warn("Un... | 1,008 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck/src/init.luau | luau | .luau | local Phase = require(script.Phase) :: any
local Pipeline = require(script.Pipeline) :: any
local Scheduler = require(script.Scheduler) :: any
local conditions = require(script.conditions)
local utils = require(script.utils)
type GenericTable = utils.GenericTable
type SignalLike<U...> = utils.SignalLike<U...>
type Co... | 1,427 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck_jabby/src/init.luau | luau | .luau | local Jabby = require(script.Parent.Jabby)
type SystemInfo = {
name: string,
phase: any,
system: (...any) -> ...any,
}
type HookArgs = {
scheduler: any,
system: SystemInfo,
nextFn: (...any) -> ...any,
}
type SystemsAddRemove = {
scheduler: any,
system: SystemInfo,
}
type SystemsReplace = {
scheduler: any,
... | 1,054 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck_matter_hooks/src/Queue.luau | luau | .luau | --!nonstrict
local Queue = {}
Queue.__index = Queue
function Queue.new()
return setmetatable({
_head = nil,
_tail = nil,
}, Queue)
end
function Queue:pushBack(value)
local entry = {
value = value,
next = nil,
}
if self._tail ~= nil then
self._tail.next = entry
end
self._tail = entry
if self._hea... | 152 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck_matter_hooks/src/init.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
type SystemInfo = {
name: string,
phase: any,
system: (...any) -> ...any,
}
type HookArgs = {
scheduler: any,
system: SystemInfo,
nextFn: (...any) -> ...any,
}
type PhaseBeganArgs = {
scheduler: any,
phase: any,
}
type SystemsAddRemove = {
sche... | 1,556 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck_runservice/src/__tests__/main.test.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Planck = require(ReplicatedStorage.Packages.Planck)
local PlanckRunService = require(ReplicatedStorage.Packages.PlanckRunService)
local Phase = Planck.Phase
local Scheduler = Planck.Scheduler
local JestGlobals = require(ReplicatedStorage.DevPackage... | 291 |
YetAnotherClown/planck | YetAnotherClown-planck-2dc9aba/src/planck_runservice/src/init.luau | luau | .luau | local RunService = game:GetService("RunService")
local Planck = require(script.Parent.Planck)
local Phase = Planck.Phase
type Phase = Planck.Phase
local Pipeline = Planck.Pipeline
type Pipeline = Planck.Pipeline
type System<U...> = Planck.System<U...>
type Scheduler<U...> = Planck.Scheduler<U...>
type SystemInfo<U... | 709 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.