Skip to content

Commit

Permalink
Replace @see by @link in jsdoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-schwarz committed Jul 31, 2024
1 parent 2c7ffe2 commit 079fb65
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
20 changes: 10 additions & 10 deletions libs/execution/src/lib/blocks/execution-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export interface ExecutionErrorDetails<N extends AstNode = AstNode> {
}

/**
* Convenience interfaces and methods wrapping @see Either of fp-ts library.
* Left is the @see ExecutionErrorDetails
* Convenience interfaces and methods wrapping {@link Either} of fp-ts library.
* Left is the {@link ExecutionErrorDetails}
* Right is a generic T
*/

Expand All @@ -21,37 +21,37 @@ export type Err = E.Left<ExecutionErrorDetails>;
export type Ok<T> = E.Right<T>;

/**
* Creates an @see Ok object from a data object typed T.
* Creates an {@link Ok} object from a data object typed T.
* @param data the data object
* @returns the created @see Ok object
* @returns the created {@link Ok} object
*/
export function ok<T>(data: T): Result<T> {
return E.right(data);
}
/**
* Creates an @see Err object from a @see ExecutionErrorDetails object.
* @param details the @see ExecutionErrorDetails object
* @returns the created @see Err object
* Creates an {@link Err} object from a {@link ExecutionErrorDetails} object.
* @param details the {@link ExecutionErrorDetails} object
* @returns the created {@link Err} object
*/
export function err<T>(details: ExecutionErrorDetails): Result<T> {
return E.left(details);
}

/**
* Type guard for @see Ok
* Type guard for {@link Ok}
*/
export function isOk<T>(result: Result<T>): result is Ok<T> {
return E.isRight(result);
}
/**
* Type guard for @see Err
* Type guard for {@link Err}
*/
export function isErr<T>(result: Result<T>): result is Err {
return E.isLeft(result);
}

/**
* Convenience method to get wrapped data of an @see Ok object.
* Convenience method to get wrapped data of an {@link Ok} object.
*/
export function okData<T>(ok: Ok<T>): T {
return ok.right;
Expand Down
4 changes: 2 additions & 2 deletions libs/language-server/src/lib/ast/model-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function getNextAstNodeContainer<T extends AstNode>(
/**
* Utility function that gets all builtin block types.
* Duplicates are only added once.
* Make sure to call @see initializeWorkspace first so that the file system is initialized.
* Make sure to call {@link initializeWorkspace} first so that the file system is initialized.
*/
export function getAllBuiltinBlockTypes(
documentService: LangiumDocuments,
Expand Down Expand Up @@ -93,7 +93,7 @@ export function getAllBuiltinBlockTypes(
/**
* Utility function that gets all builtin constraint types.
* Duplicates are only added once.
* Make sure to call @see initializeWorkspace first so that the file system is initialized.
* Make sure to call {@link initializeWorkspace} first so that the file system is initialized.
*/
export function getAllBuiltinConstraintTypes(
documentService: LangiumDocuments,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export class BlockTypeWrapper extends TypedObjectWrapper<ReferenceableBlockTypeD

/**
* Creates a BlockTypeWrapper if possible. Otherwise, throws error.
* Use @see canBeWrapped to check whether wrapping will be successful.
* Use {@link canBeWrapped} to check whether wrapping will be successful.
*
* Use @see WrapperFactoryProvider for instantiation instead of calling this constructor directly.
* Use {@link WrapperFactoryProvider} for instantiation instead of calling this constructor directly.
*/
constructor(
toBeWrapped:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { BlockTypeWrapper } from './block-type-wrapper';
export class CompositeBlockTypeWrapper extends BlockTypeWrapper {
/**
* Creates a CompositeBlockTypeWrapper if possible. Otherwise, throws error.
* Use @see canBeWrapped to check whether wrapping will be successful.
* Use {@link canBeWrapped} to check whether wrapping will be successful.
*
* Use @see WrapperFactoryProvider for instantiation instead of calling this constructor directly.
* Use {@link WrapperFactoryProvider} for instantiation instead of calling this constructor directly.
*/
constructor(
private blockTypeDefinition: CompositeBlockTypeDefinition,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export class ConstraintTypeWrapper extends TypedObjectWrapper<BuiltinConstraintt

/**
* Creates a ConstraintTypeWrapper if possible. Otherwise, throws error.
* Use @see canBeWrapped to check whether wrapping will be successful.
* Use {@link canBeWrapped} to check whether wrapping will be successful.
*
* Use @see WrapperFactoryProvider for instantiation instead of calling this constructor directly.
* Use {@link WrapperFactoryProvider} for instantiation instead of calling this constructor directly.
*/
constructor(
toBeWrapped:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export abstract class PrimitiveValueType<
/**
* The user documentation for the value type.
* Text only, no comment characters.
* Should be given for all user-referenceable value types @see isReferenceableByUser
* Should be given for all user-referenceable value types {@link isReferenceableByUser}
*/
getUserDoc(): string | undefined {
return undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface ValueType<
/**
* The convertible relation reflects the ability of primitive types to
* convert into another primitive value type in a loss-less way (e.g., int to decimal).
* Atomic value types inherit (@see isSubtypeOf) the conversion behavior of their primitive value type.
* Atomic value types inherit ({@link isSubtypeOf}) the conversion behavior of their primitive value type.
*/
isConvertibleTo(target: ValueType): boolean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@
publish builtin constrainttype RangeConstraint on decimal {
/**
* Lower bound for the valid value range.
* @see lowerBoundInclusive whether inclusive or exclusive.
* See {@link lowerBoundInclusive} whether inclusive or exclusive.
* The default value is the smallest usable integer.
*/
property lowerBound oftype decimal : -9007199254740991;

/**
* Boolean flag whether @see lowerBound is inclusive or exclusive.
* Boolean flag whether {@link lowerBound} is inclusive or exclusive.
*/
property lowerBoundInclusive oftype boolean : true;

/**
* Upper bound for the valid value range.
* @see upperBoundInclusive whether inclusive or exclusive.
* See {@link upperBoundInclusive} whether inclusive or exclusive.
* The default value is the biggest usable integer.
*/
property upperBound oftype decimal : 9007199254740991;

/**
* Boolean flag whether @see upperBound is inclusive or exclusive.
* Boolean flag whether {@link upperBound} is inclusive or exclusive.
*/
property upperBoundInclusive oftype boolean : true;
}

0 comments on commit 079fb65

Please sign in to comment.