Skip to content
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

Reworded comments #547

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/animation/Animation.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ declare class Animation extends EventEmitter<Animation.EventMap> {
isFinished(): boolean;

// checkActive(): void;
// - Internal use only
// - Only used internally

/**
* Returns ‘true’ if the animation is currently progressing (playing or stopping)
Expand All @@ -201,7 +201,7 @@ declare class Animation extends EventEmitter<Animation.EventMap> {
// _getStopDuration(): any;
// apply(): void;
// reset(): void;
// - Internal use only
// - Only used internally

/**
* Gets the current state of the animation
Expand Down
2 changes: 1 addition & 1 deletion src/animation/Transition.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ declare class Transition extends EventEmitter<Transition.EventMap> {
isRunning(): boolean;

// progress(dt: any): void;
// - Internal use only, called by TransitionManager
// - Only used internally, called by TransitionManager
// invokeListeners(): void;
// - Private

Expand Down
10 changes: 5 additions & 5 deletions src/application/Application.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ declare class Application<
// _setOptions(o: any): void;
// __construct(): void;
// __init(): void;
// - Internal use only
// - Only used internally

/**
* Update the focus path of the application
Expand All @@ -169,13 +169,13 @@ declare class Application<
// __updateFocus(): void;
// __updateFocusRec(): any;
// updateFocusSettings(): void;
// - Internal use only
// - Only used internally

// _handleFocusSettings(settings: any, prevSettings: any, focused: any, prevFocused: any): void;
// - Already defined on Component

// __getFocusPath(): any;
// - Internal use only
// - Only used internally

/**
* Active focus path of the application
Expand All @@ -202,7 +202,7 @@ declare class Application<
// _findChildren(bucket: any, children: any): any;
// _withinClickableRange(affectedChildren: any, cursorX: any, cursorY: any): any;
// _testCollision(px: any, py: any, cx: any, cy: any, cw: any, ch: any): any;
// - Internal use only
// - Only used internally

/**
* Shuts down the Application and the Lightning Stage its rendered on.
Expand All @@ -213,7 +213,7 @@ declare class Application<
destroy(): void;

// _destroy(): void;
// - Internal use only
// - Only used internally

/**
* Gets the active Canvas HTML Element used for rendering
Expand Down
8 changes: 4 additions & 4 deletions src/application/Component.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export type CompileComponentTemplateSpecType<
/**
* Returns `true` if the CustomKeyHandlers interface is augmented
*
* @hidden Internal use only
* @hidden Only used internally
*/
type IsCustomKeyHandlersAugmented =
object extends Required<Component.CustomKeyHandlers>
Expand All @@ -48,7 +48,7 @@ type IsCustomKeyHandlersAugmented =
/**
* Signals by SignalMap
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type __Signals<SignalMapType = Record<never, never>> = {
[Key in keyof SignalMapType]?:
Expand All @@ -58,7 +58,7 @@ export type __Signals<SignalMapType = Record<never, never>> = {
/**
* PassSignals by SignalMap
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type __PassSignals<SignalMapType = Record<never, never>> = {
[Key in keyof SignalMapType]?:
Expand Down Expand Up @@ -1190,7 +1190,7 @@ declare class Component<
/**
* Phantom type that holds the TemplateSpec.
*
* Internal Use Only. NOT AVAILABLE AT RUNTIME.
* Only used internally. NOT AVAILABLE AT RUNTIME.
*/
readonly __$type_TemplateSpec: CompileComponentTemplateSpecType<TemplateSpecType, TypeConfig>
}
Expand Down
28 changes: 14 additions & 14 deletions src/internalTypes.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* This file contains internal types that are common to multiple modules
*
* @hidden Internal use only
* @hidden Only used internally
* @module
*/
import EventEmitter from './EventEmitter.mjs';
Expand All @@ -29,7 +29,7 @@ import Element, { IsLooseTypeConfig } from './tree/Element.mjs'
/**
* Allows all the documentation of a template spec to be inherited by any Element
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type Documentation<T> = {
// WARNING: You cannot use conditional key manipulation here or it will not allow documentation to be passed down
Expand All @@ -48,7 +48,7 @@ import Element, { IsLooseTypeConfig } from './tree/Element.mjs'
* ReduceSpecificity<true, number | boolean> === boolean
* ```
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type ReduceSpecificity<T, U> =
U extends U
Expand Down Expand Up @@ -80,7 +80,7 @@ export type ReduceSpecificity<T, U> =
/**
* Extracts the EventMapType from Element Config
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type EventMapType<TypeConfig extends Element.TypeConfig> =
IsLooseTypeConfig<TypeConfig> extends true
Expand All @@ -90,14 +90,14 @@ export type EventMapType<TypeConfig extends Element.TypeConfig> =
/**
* Extracts the TextureType from Element TypeConfig
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type TextureType<TypeConfig extends Element.TypeConfig> = TypeConfig['TextureType'];

/**
* Extracts the SignalMapType from Component TypeConfig
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type SignalMapType<TypeConfig extends Component.TypeConfig> =
IsLooseTypeConfig<TypeConfig> extends true
Expand All @@ -113,7 +113,7 @@ export type SignalMapType<TypeConfig extends Component.TypeConfig> =
* from an EventMap function signature without having to enforce a generic constraint on all
* EventMaps, which isn't practical without blowing up type safety.
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type HandlerParameters<PossibleFunction> =
PossibleFunction extends (...args: any[]) => any
Expand All @@ -129,7 +129,7 @@ export type HandlerParameters<PossibleFunction> =
* @privateRemarks
* Like HandlerParameter above, this is a "safe" version of the included `ReturnType` type.
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type HandlerReturnType<PossibleFunction> =
PossibleFunction extends (...args: any[]) => any
Expand All @@ -141,22 +141,22 @@ export type HandlerReturnType<PossibleFunction> =
/**
* Set of all capital letters
*
* @hidden Internal use only
* @hidden Only used internally
*/
type Alphabet = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';

/**
* Any string that begins with a capital letter
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type ValidRef = `${Alphabet}${string}`;

/**
* Returns `true` if T is a type that should terminate the calculation of
* tag paths.
*
* @hidden Internal use only
* @hidden Only used internally
*/
type IsTerminus<T> =
T extends (string | number | boolean | any[] | Element.Constructor | Element)
Expand Down Expand Up @@ -210,7 +210,7 @@ type IsTerminus<T> =
* ['MyParentElement', 'MyChildElement', 'MyGrandChildElement', [object]];
* ```
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type SpecToTagPaths<T> =
IsTerminus<T> extends true
Expand All @@ -224,7 +224,7 @@ export type SpecToTagPaths<T> =
/**
* Joins the given path string tuple into a single `.` separated string tag path
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type Join<T extends string[]> =
T extends [] ? never :
Expand Down Expand Up @@ -276,7 +276,7 @@ export type Join<T extends string[]> =
* }
* ```
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type CombineTagPaths<TagPaths extends any[]> = {
[PathWithType in TagPaths as PathWithType extends [...infer Path extends string[], [any]] ? Join<Path> : never]:
Expand Down
2 changes: 1 addition & 1 deletion src/textures/TextTexture.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ declare class TextTexture extends Texture implements Required<Omit<TextTexture.S
// protected _changed(): void;
// protected stage: Stage;
// cloneArgs(): Required<TextTexture.Settings>;
// - Internal use only
// - Internal Types


get text(): string;
Expand Down
30 changes: 15 additions & 15 deletions src/tree/Element.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import TextureSource from "./TextureSource.mjs";
* Filters out any non-ref keys from an inline Element template and returns the filtered
* type with Strong Element template spec.
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type InlineElement<ElementTemplate> = {
[P in keyof ElementTemplate as P extends ValidRef ? P : never]:
Expand All @@ -51,7 +51,7 @@ export type InlineElement<ElementTemplate> = {
/**
* An object keyed by transitionable Element properties
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type SmoothTemplate<TemplateSpecType = Element.TemplateSpec> = {
[P in keyof TemplateSpecType]?:
Expand All @@ -66,7 +66,7 @@ export type SmoothTemplate<TemplateSpecType = Element.TemplateSpec> = {
* An object keyed by transitionable Element properties (numeric properties)
* and valued by {@link lng.types.TransitionSettings.Literal}
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type TransitionsTemplate<TemplateSpecType = Element.TemplateSpec> = {
[P in keyof TemplateSpecType]?:
Expand All @@ -83,7 +83,7 @@ export type TransitionsTemplate<TemplateSpecType = Element.TemplateSpec> = {
* @privateRemarks
* Used to build: __$type_TemplateSpec
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type CompileElementTemplateSpecType<
TemplateSpecType extends Element.TemplateSpec,
Expand All @@ -98,7 +98,7 @@ export type CompileElementTemplateSpecType<
* If `PossibleElementConstructor` is an inline Element or a Component Constructor, convert it to it's instantiated form.
* Otherwise, return the input type (or something else by setting `Default`)
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type TransformPossibleElement<Key, PossibleElementConstructor, Default = PossibleElementConstructor> =
string extends Key
Expand Down Expand Up @@ -132,7 +132,7 @@ export type IsLooseTypeConfig<TypeConfig extends Element.TypeConfig> = string ex
* Converts a loose Element template to a strong Element template by
* removing the index signature that Element.TemplateSpecLoose adds
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type RemoveIndex<T> = {
[ K in keyof T as string extends K ? never : number extends K ? never : K ] : T[K]
Expand Down Expand Up @@ -173,7 +173,7 @@ export type RemoveIndex<T> = {
* }
* ```
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type TemplateSpecTags<TemplateSpec extends Element.TemplateSpec> = {
[K in keyof CombineTagPaths<SpecToTagPaths<RemoveIndex<TemplateSpec>>>]: TransformPossibleElement<K, CombineTagPaths<SpecToTagPaths<RemoveIndex<TemplateSpec>>>[K]>;
Expand All @@ -189,7 +189,7 @@ export type TemplateSpecTags<TemplateSpec extends Element.TemplateSpec> = {
* @privateRemarks
* The refs are transformed into proper Element / Component references
*
* @hidden Internal use only
* @hidden Only used internally
*/
export type TemplateSpecRefs<TemplateSpec extends Element.TemplateSpec> = {
[K in keyof CombineTagPathsSingleLevel<SpecToTagPaths<RemoveIndex<TemplateSpec>>>]: TransformPossibleElement<K, CombineTagPathsSingleLevel<SpecToTagPaths<RemoveIndex<TemplateSpec>>>[K]>;
Expand Down Expand Up @@ -1407,24 +1407,24 @@ declare class Element<
readonly displayedTexture: TextureType<TypeConfig> | null;

// onTextureSourceLoaded() {
// - Internal use only. Calling/overriding this can break things
// - Only used internally. Calling/overriding this can break things

// onTextureSourceLoadError(error: unknown): void;
// - Internal use only. Calling/overriding this can break things
// - Only used internally. Calling/overriding this can break things

/**
* Force re-create of render texture and re-invoke shader
*/
forceRenderUpdate(): void;

// onDisplayedTextureClippingChanged
// - Internal use only. Calling/overriding this can break things
// - Only used internally. Calling/overriding this can break things

// onPrecisionChanged
// - Internal use only. Calling/overriding this can break things
// - Only used internally. Calling/overriding this can break things

// onDimensionsChanged(w: number, h: number): void;
// - Internal use only. Calling/overriding this can break things
// - Only used internally. Calling/overriding this can break things

/**
* Get the corner points of this Element
Expand Down Expand Up @@ -1507,7 +1507,7 @@ declare class Element<
getSettings(): Element.TemplateSpec;

// getNonDefaults() {
// - Internal use only
// - Only used internally

/**
* `true` if Element is within the bounds margin
Expand Down Expand Up @@ -1915,7 +1915,7 @@ declare class Element<
// get tags() {
// set tags(v) {
// set t(v) {
// - These tag related methods/properties seem very internal use only and it's not clear if there's a
// - These tag related methods/properties seem very Only used internally and it's not clear if there's a
// practical external use
// static getGetter(propertyPath) {
// static getSetter(propertyPath) {
Expand Down
Loading