Skip to content

Commit 52f4973

Browse files
authored
docs(all): tag examples with @example (#3391)
1 parent 3e7404d commit 52f4973

File tree

64 files changed

+73
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+73
-27
lines changed

libs/analytics/src/lib/analytics-tracker.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export type DaffAnalyticsTrackerFunction = (event: DaffAnalyticsEvent) => Observ
2020
/**
2121
* The tracker type.
2222
*
23-
* Trackers can either be classes:
23+
* @example Implementing a tracker as a class
2424
*
2525
* ```ts
2626
* export class MyTracker implements DaffAnalyticsTracker {
@@ -30,7 +30,7 @@ export type DaffAnalyticsTrackerFunction = (event: DaffAnalyticsEvent) => Observ
3030
* }
3131
* ```
3232
*
33-
* or functions:
33+
* @example Implementing a tracker as a function
3434
*
3535
* ```ts
3636
* export const trackThis = (event: DaffAnalyticsEvent) => {

libs/auth/state/src/injection-tokens/unauthenticated/hooks.token.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ export const {
1313
/**
1414
* Provides {@link DAFF_AUTH_UNAUTHENTICATED_HOOKS}.
1515
*
16+
* @example
1617
* ```ts
1718
* providers: [
1819
* ...daffAuthProvideUnauthenticatedHooks(
19-
* myReducer1,
20-
* myReducer2
20+
* myHook1,
21+
* myHook2
2122
* )
2223
* ]
2324
* ```

libs/auth/state/src/reducers/token/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil auth reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffAuthProvideExtraReducers(

libs/authorizenet/state/src/reducers/token/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil authorizenet reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffAuthorizeNetProvideExtraReducers(

libs/cart-store-credit/state/src/reducers/token/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil cart reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffCartStoreCreditProvideExtraReducers(

libs/cart/driver/in-memory/src/injection-tokens/extra-attributes-hook.token.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ export const {
1414
* The value returned by the hook function will be set to the returned cart's `extra_attributes` field
1515
* for driver calls that return a cart.
1616
*
17-
* The following example demonstrates adding the `numberOfCartItems` field to `extra_attributes`:
17+
* Note that this and any `extra_attributes` features are for advanced users
18+
* and should be used with care.
19+
*
20+
* @example Adding the `numberOfCartItems` field to `extra_attributes`
1821
* ```ts
1922
* (reqInfo: RequestInfo, cart: DaffCart) => ({
2023
* numberOfCartItems: cart.items.length
2124
* })
2225
* ```
23-
*
24-
* Note that this and any `extra_attributes` features are for advanced users
25-
* and should be used with care.
2626
*/
2727
token: DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,
2828
/**

libs/cart/driver/magento/src/injection-tokens/transforms/cart-item/token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const {
1616
*
1717
* See {@link DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS}.
1818
*
19+
* @example
1920
* ```ts
2021
* providers: [
2122
* ...provideDaffCartMagentoCartItemTransforms(

libs/cart/driver/magento/src/injection-tokens/transforms/cart/token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const {
2020
*
2121
* See {@link DAFF_CART_MAGENTO_CART_TRANSFORMS}.
2222
*
23+
* @example
2324
* ```ts
2425
* providers: [
2526
* ...provideDaffCartMagentoCartTransforms(

libs/cart/state/src/reducers/token/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil cart reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffCartProvideExtraReducers(

libs/cart/state/src/reducers/token/meta.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const {
1616
/**
1717
* Provides additional meta-reducers that run after the standard Daffodil cart meta-reducers.
1818
*
19+
* @example
1920
* ```ts
2021
* providers: [
2122
* ...daffCartProvideMetaReducers(

libs/category/driver/magento/src/fragments/token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const {
1414
*
1515
* See {@link MAGENTO_CATEGORY_EXTRA_FRAGMENTS}.
1616
*
17+
* @example
1718
* ```ts
1819
* providers: [
1920
* ...magentoProvideCategoryExtraFragments(

libs/category/driver/magento/src/transforms/token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
*
1616
* See {@link MAGENTO_CATEGORY_EXTRA_TRANSFORMS}.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...magentoProvideCategoryExtraTransforms(

libs/category/routing/src/injection-tokens/request/builders.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const {
2020
*
2121
* See {@link DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS}.
2222
*
23+
* @example
2324
* ```ts
2425
* providers: [
2526
* ...provideDaffCategoryRoutingRequestBuilders(

libs/category/state/src/reducers/token/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const {
1414
/**
1515
* Provides additional reducers that run after the standard Daffodil category reducers.
1616
*
17+
* @example
1718
* ```ts
1819
* providers: [
1920
* ...daffCategoryProvideExtraReducers(

libs/core/external-script/src/external-script.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface LoadedExternalScript extends DaffExternalScript {
2424
*
2525
* ### Usage example
2626
*
27-
* The following loads an external script into the document.
27+
* @example Loading an external script into the document
2828
*
2929
* ```ts
3030
* import { DOCUMENT } from '@angular/common';

libs/core/external-script/src/script.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
/**
22
* Represents the structure of an external script that can be loaded into a document.
33
*
4+
* @example Using DaffExternalScript interface to define an external script object
45
* ```ts
5-
* // Example of using DaffExternalScript interface to define an external script object.
6-
*
76
* const externalScript: DaffExternalScript = {
87
* src: 'https://example.com/script.js',
98
* async: true,

libs/core/external-script/testing/src/external-script.service.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@ import { TestScripts } from './constants';
1313
/**
1414
* A service for loading external scripts into the document.
1515
*
16-
* ### Usage example
17-
*
18-
* The following loads an external script into the document.
16+
* @example Loading an external script into the document
1917
*
2018
* ```ts
21-
*
2219
* import { DaffExternalScriptTestingService } from '@daffodil/core/external-script/testing';
2320
*
2421
* const externalScriptService = new DaffExternalScriptTestingService();

libs/core/src/constructable/constructable.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* A type which describes a function which would return an instance of a class
33
* Typically, we call this the "new" method in a language.
44
*
5-
* A sample usage:
5+
* @example
66
* ```ts
77
* class MyClass {
88
* readonly myProp: string = 'prop';

libs/core/testing/src/factories/factory.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ import { IDaffModelFactory } from './factory.interface';
1313
*
1414
* The constructor args can be omitted if the `create` method is overridden.
1515
*
16-
* The following example demonstrates using this feature to inject
17-
* a different factory into a mock class.
18-
*
16+
* @example Injecting a different factory into a mock class
1917
* ```ts
2018
* class MyMockModel {
2119
* constructor(

libs/customer-order/driver/magento/2-4-5/src/injection-tokens/fragments/order.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const {
2121
*
2222
* See {@link DAFF_CUSTOMER_ORDER_MAGENTO_EXTRA_ORDER_FRAGMENTS}.
2323
*
24+
* @example
2425
* ```ts
2526
* providers: [
2627
* ...provideDaffCustomerOrderMagentoExtraOrderFragments(

libs/customer-order/driver/magento/2-4-5/src/injection-tokens/transforms/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const {
1919
*
2020
* See {@link DAFF_CUSTOMER_ORDER_MAGENTO_EXTRA_ORDER_TRANSFORMS}.
2121
*
22+
* @example
2223
* ```ts
2324
* providers: [
2425
* ...provideDaffCustomerOrderMagentoExtraOrderTransforms(

libs/customer-order/driver/magento/2-4-6/src/injection-tokens/fragments/order.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const {
2424
*
2525
* See {@link DAFF_CUSTOMER_ORDER_MAGENTO_EXTRA_ORDER_FRAGMENTS}.
2626
*
27+
* @example
2728
* ```ts
2829
* providers: [
2930
* ...provideDaffCustomerOrderMagentoExtraOrderFragments(

libs/customer-order/driver/magento/2-4-6/src/injection-tokens/transforms/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const {
2323
*
2424
* See {@link DAFF_CUSTOMER_ORDER_MAGENTO_EXTRA_ORDER_TRANSFORMS}.
2525
*
26+
* @example
2627
* ```ts
2728
* providers: [
2829
* ...provideDaffCustomerOrderMagentoExtraOrderTransforms(

libs/customer-payment/state/src/reducers/token/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil customer reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffCustomerPaymentProvideExtraReducers(

libs/customer-store-credit/state/src/reducers/token/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil customer reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffCustomerStoreCreditProvideExtraReducers(

libs/customer/state/src/reducers/token/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil customer reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffCustomerProvideExtraReducers(

libs/external-router/driver/magento/2.4.1/src/magento.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { DaffExternalRouterMagentoDriver } from './magento.service';
1212
/**
1313
* The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.
1414
*
15+
* @example
1516
* ```ts
1617
* @NgModule({
1718
* declarations: [],

libs/external-router/driver/magento/2.4.2/src/magento.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { DaffExternalRouterMagentoDriver } from './magento.service';
1313
/**
1414
* The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.
1515
*
16+
* @example
1617
* ```ts
1718
* @NgModule({
1819
* declarations: [],

libs/external-router/driver/magento/2.4.3/src/magento.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { DaffExternalRouterMagentoDriver } from './magento.service';
1313
/**
1414
* The module used to configure the {@link DaffExternalRouterDriver} for usage with Magento.
1515
*
16+
* @example
1617
* ```ts
1718
* @NgModule({
1819
* declarations: [],

libs/external-router/src/model/resolvable-route.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { DaffExternalRouteType } from './route-type';
77
* A `DaffExternallyResolvableUrl` describes the relationship between a "type" of route
88
* as determined by an external platform and a URI.
99
*
10+
* @example
1011
* ```ts
1112
* export const resolvableRoute: DaffExternallyResolvableUrl = {
1213
* id: "id-of-resource",

libs/navigation/driver/magento/src/transforms/token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
*
1616
* See {@link MAGENTO_NAVIGATION_TREE_TRANSFORMS}.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...magentoProvideNavigationTreeTransforms(

libs/order/state/src/reducers/token/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil order reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffOrderProvideExtraReducers(

libs/payment/state/src/reducers/token/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil cart reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffPaymentProvideExtraReducers(

libs/payment/testing/src/injection-tokens/factories/kind.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const {
2020
*
2121
* See {@link DAFF_PAYMENT_RESPONSE_KIND_FACTORIES}.
2222
*
23+
* @example
2324
* ```ts
2425
* providers: [
2526
* ...provideDaffPaymentResponseKindFactories(

libs/product-composite/state/src/reducers/injection-tokens/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil cart reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffProductCompositeProvideExtraReducers(

libs/product-configurable/state/src/reducers/injection-tokens/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const {
1515
/**
1616
* Provides additional reducers that run after the standard Daffodil cart reducers.
1717
*
18+
* @example
1819
* ```ts
1920
* providers: [
2021
* ...daffProductConfigurableProvideExtraReducers(

libs/product/driver/in-memory/src/injection-tokens/transforms/product-response/response-extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const {
1717
*
1818
* See {@link DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS}.
1919
*
20+
* @example
2021
* ```ts
2122
* providers: [
2223
* ...provideDaffProductInMemoryExtraProductResponseTransforms(

libs/product/driver/magento/src/injection-tokens/fragments/product-page.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const {
2121
*
2222
* See {@link DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PAGE_FRAGMENTS}.
2323
*
24+
* @example
2425
* ```ts
2526
* providers: [
2627
* ...provideDaffProductMagentoExtraProductPageFragments(

libs/product/driver/magento/src/injection-tokens/fragments/product-preview.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const {
2525
*
2626
* See {@link DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_FRAGMENTS}.
2727
*
28+
* @example
2829
* ```ts
2930
* providers: [
3031
* ...provideDaffProductMagentoExtraProductPreviewFragments(

libs/product/driver/magento/src/injection-tokens/fragments/product.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const {
2121
*
2222
* See {@link DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS}.
2323
*
24+
* @example
2425
* ```ts
2526
* providers: [
2627
* ...provideDaffProductMagentoExtraProductFragments(

libs/product/driver/magento/src/injection-tokens/transforms/product-preview/preview-extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const {
2323
*
2424
* See {@link DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_TRANSFORMS}.
2525
*
26+
* @example
2627
* ```ts
2728
* providers: [
2829
* ...provideDaffProductMagentoExtraProductPreviewTransforms(

libs/product/driver/magento/src/injection-tokens/transforms/product-response/response-extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const {
1818
*
1919
* See {@link DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_RESPONSE_TRANSFORMS}.
2020
*
21+
* @example
2122
* ```ts
2223
* providers: [
2324
* ...provideDaffProductMagentoExtraProductResponseTransforms(

libs/product/driver/magento/src/injection-tokens/transforms/product/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const {
2323
*
2424
* See {@link DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_TRANSFORMS}.
2525
*
26+
* @example
2627
* ```ts
2728
* providers: [
2829
* ...provideDaffProductMagentoExtraProductTransforms(

libs/product/state/src/reducers/injection-tokens/extra.token.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const {
1616
/**
1717
* Provides additional reducers that run after the standard Daffodil cart reducers.
1818
*
19+
* @example
1920
* ```ts
2021
* providers: [
2122
* ...daffProductProvideExtraReducers(

0 commit comments

Comments
 (0)