@shd101wyy/yo 0.1.20 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/skills/yo-core-patterns/core-patterns-cheatsheet.md +2 -0
- package/.github/skills/yo-syntax/syntax-cheatsheet.md +2 -1
- package/out/cjs/index.cjs +552 -548
- package/out/cjs/yo-cli.cjs +671 -667
- package/out/cjs/yo-lsp.cjs +558 -554
- package/out/esm/index.mjs +485 -481
- package/out/types/src/codegen/exprs/drop-dup.d.ts +1 -0
- package/out/types/src/evaluator/trait-checking.d.ts +11 -1
- package/out/types/src/evaluator/values/impl.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/scripts/install.ps1 +143 -0
- package/scripts/install.sh +139 -0
- package/std/cli/arg_parser.yo +148 -24
- package/std/collections/array_list.yo +77 -0
- package/std/collections/hash_map.yo +87 -0
- package/std/collections/hash_set.yo +44 -0
- package/std/collections/ordered_map.yo +244 -0
- package/std/{process.yo → env/index.yo} +38 -89
- package/std/fs/temp.yo +2 -1
- package/std/os/env.yo +2 -1
- package/std/prelude.yo +404 -3
- package/std/process/command.yo +303 -0
- package/std/process/index.yo +45 -0
- package/std/string/index.yo +3 -1
- package/std/string/string.yo +245 -1
- package/std/string/string_builder.yo +138 -0
|
@@ -179,6 +179,8 @@ impl(forall(T), where(T <: ToString), Box(T),
|
|
|
179
179
|
```
|
|
180
180
|
|
|
181
181
|
- Use `Self` inside impl method signatures
|
|
182
|
+
- Use `Self` inside `struct(...)`, `object(...)`, `enum(...)` definitions for recursive type references (the type name is not yet available during its own definition)
|
|
183
|
+
- `Self` also works inside generic type constructors — it refers to the current instantiation (e.g., `Tree(T)` inside `Tree`). Use `recur(args)` only when the type arguments differ from the current instantiation.
|
|
182
184
|
- `forall(T)` + `where(T <: Trait)` for generic impls
|
|
183
185
|
- Trait impls: `impl(MyType, MyTrait(args), : trait_field_bindings...)`
|
|
184
186
|
|
|
@@ -122,7 +122,8 @@ impl(Counter,
|
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
- No space between a function type and its body: `(fn(...) -> T)(...)`
|
|
125
|
-
- Use `Self` in method signatures
|
|
125
|
+
- Use `Self` in method signatures and in type definitions for recursive references (the type name is not available during its own definition)
|
|
126
|
+
- `Self` also works inside generic type constructors — it refers to the current instantiation (e.g., `Tree(T)` inside `Tree`). Use `recur(args)` only when type arguments differ from the current instantiation.
|
|
126
127
|
- Wrap `fn` types in parentheses when they appear after `:`
|
|
127
128
|
|
|
128
129
|
### Named arguments and default values
|