- Copy the file below into one called
testez.yml - In
selene.toml, replacestd = "roblox"withstd = "roblox+testez"
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
| -- Luau limitations prevent React's native binding methods from being useful or type-safe. | |
| -- This is in large part due to Luau's recursive generic restriction, which makes it impossible | |
| -- to have a method on `T<A>` return `T<B>`. | |
| -- Thus, instead of methods, all of these are static functions. | |
| -- Note that this module **intentionally excludes "Bindable" types**. | |
| -- This is because when trying to write something like `mapBindable`, in practice | |
| -- Luau will start producing error types instead. | |
| -- The only code in here is stuff that is proven to be type-safe in practice. | |
| -- Replacement guide: |
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
| local ESCAPES: { [string]: string? } = { | |
| ["&"] = "&", | |
| ["<"] = "<", | |
| [">"] = ">", | |
| ['"'] = """, | |
| ["'"] = "'", | |
| } | |
| local function escapeRichText(text: string): string | |
| local start, finish = 1, 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
| { | |
| // Place your snippets for luau here. Each snippet is defined under a snippet name and has a prefix, body and | |
| // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
| // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
| // same ids are connected. | |
| // Example: | |
| // "Print to console": { | |
| // "prefix": "log", | |
| // "body": [ | |
| // "console.log('$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
| local function graphemeCount(text: string): number | |
| local count = 0 | |
| for _ in utf8.graphemes(text) do | |
| count += 1 | |
| end | |
| return count | |
| 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
| # This file was @generated by generate-roblox-std at 2022-06-04 18:09:36.972430600 -07:00 | |
| --- | |
| base: lua51 | |
| name: roblox | |
| globals: | |
| Axes.new: | |
| args: | |
| - type: "..." | |
| BrickColor.Black: | |
| args: [] |
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
| local function curryWithNumberOfArgs(callback, numArgs) | |
| local function curried(...) | |
| local passedArgs = table.pack(...) | |
| if passedArgs.n > numArgs then | |
| error("too many arguments passed to curried function (called after already ran)") | |
| elseif passedArgs.n == numArgs then | |
| return callback(...) | |
| 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
| local weakInstanceTable = {} | |
| weakInstanceTable.__tostring = "<Weak Instance Table>" | |
| function weakInstanceTable:__newindex(key, value) | |
| assert(typeof(key) == "Instance", "keys need to be an Instance") | |
| assert(key:IsDescendantOf(game), "key is not a descendant of the DataModel") | |
| rawset(self, key, value) | |
| key.AncestryChanged:connect(function() | |
| if not key:IsDescendantOf(game) then |
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
| use lazy_static::lazy_static; | |
| use std::collections::{HashMap, HashSet}; | |
| use std::env; | |
| use std::fs; | |
| use std::path::{Component, Path}; | |
| use std::process; | |
| use walkdir::WalkDir; | |
| lazy_static! { | |
| static ref SOURCE: &'static str = option_env!("SOURCE_LANGUAGE").unwrap_or("en-us"); |
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
| extern crate walkdir; | |
| use std::env; | |
| use std::fs; | |
| use std::path::Path; | |
| use walkdir::WalkDir; | |
| fn main() -> std::io::Result<()> { | |
| println!("RbxSync -> Rojo name format"); |
NewerOlder