This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
--> Packages ------------------------------------------------------------------------------------------ | |
local Fusion = require(--[[Put path to Fusion module here.]]) | |
local Value, peek, Computed = Fusion.Value, Fusion.peek, Fusion.Computed | |
------------------------------------------------------------------------------------------------------- | |
--> Types --------------------------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Copyright 2024 Cameron Campbell | |
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 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE U |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
--> Modules ------------------------------------------------------------------------------------------- | |
local Fusion = require(script.Parent.Fusion) -- Replace with path to fusion. | |
------------------------------------------------------------------------------------------------------- | |
--> Types --------------------------------------------------------------------------------------------- | |
type Scope = Fusion.Scope<typeof(Fusion)> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
--> Modules ------------------------------------------------------------------------------------------- | |
local Fusion = require(Packages.Fusion) -- Make sure to put path to Fusion here. | |
------------------------------------------------------------------------------------------------------- | |
--> Functions ----------------------------------------------------------------------------------------- | |
local function ComputeUDim(scope: Fusion.Scope<typeof(Fusion)>, scale: Fusion.UsedAs<number>, offset: Fusion.UsedAs<number>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Copyright 2024 Cameron Campbell | |
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 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE U |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
type AppRunConfig = { | |
port: number | |
} | |
type function _stringSplitOnce(str: string, delimiter: string) | |
local start, finish = string.find(str, delimiter, 1, true) | |
if start then | |
local before = string.sub(str, 1, start - 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
--!nolint LocalUnused | |
--!nolint LocalShadow | |
local task = nil -- Disable usage of Roblox's task scheduler | |
--[[ | |
A special key for property tables, which parents any given descendants into | |
an instance. | |
]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
type function _safeIs(input: any, isType: any) | |
if typeof(input) ~= "userdata" then return false end | |
local is = input.is | |
if not is then return false end | |
return is(input, isType) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
--!nolint LocalShadow | |
export type TrieNode = { | |
is_end: boolean, | |
children: { [number]: TrieNode } | |
} | |
local function table_is_empty(tble: { [any]: any }) | |
for _ in tble do return false end |
OlderNewer