-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tree: Const schema type parameters, more tests tree and misc cleanups #22927
Conversation
@@ -449,7 +449,7 @@ export interface TreeArrayNodeUnsafe<TAllowedTypes extends Unenforced<ImplicitAl | |||
// @beta @sealed | |||
export const TreeBeta: { | |||
on<K extends keyof TreeChangeEventsBeta<TNode>, TNode extends TreeNode>(node: TNode, eventName: K, listener: NoInfer<TreeChangeEventsBeta<TNode>[K]>): () => void; | |||
clone<TSchema extends ImplicitFieldSchema>(node: TreeFieldFromImplicitField<TSchema>): TreeFieldFromImplicitField<TSchema>; | |||
clone<const TSchema extends ImplicitFieldSchema>(node: TreeFieldFromImplicitField<TSchema>): TreeFieldFromImplicitField<TSchema>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When combined with the recent corrections to schema variance, this change improves handling of passing array literals to this function as the schema for a union, since it removes the need to specify "as const" at the call site.
@@ -16,13 +16,14 @@ import { getUnhydratedContext } from "../createContext.js"; | |||
* @remarks | |||
* This is "concise" meaning that explicit type information is omitted. | |||
* If the schema is compatible with {@link ITreeConfigurationOptions.preventAmbiguity}, | |||
* types will be lossless and compatible with {@link TreeBeta.create} (unless the options are used to customize it). | |||
* types will be lossless and compatible with {@link TreeAlpha.create} (unless the options are used to customize it). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neither of these links works yet, but this is the API thats getting added in #22566
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Coverage Summary
↑ packages.dds.tree.src.simple-tree.api:
Line Coverage Change: 0.05% Branch Coverage Change: 0.04%
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 86.49% | 86.53% | ↑ 0.04% |
Line Coverage | 81.68% | 81.73% | ↑ 0.05% |
Baseline commit: 645b9ed
Baseline build: 303023
Happy Coding!!
Code coverage comparison check passed!!
⯅ @fluid-example/bundle-size-tests: +245 Bytes
Baseline commit: 645b9ed |
Description
A collection of minor improvements split out from #22566 for simplified and more targeted review.
Reviewer Guidance
The review process is outlined on this wiki page.