@ahoo-wang/fetcher 1.6.2 → 1.6.5
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/dist/fetcherCapable.d.ts +22 -0
- package/dist/fetcherCapable.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +223 -219
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Fetcher } from './fetcher';
|
|
2
|
+
/**
|
|
3
|
+
* Interface that defines a capability for objects that can have a fetcher.
|
|
4
|
+
* This interface is typically used to mark components or objects that can perform fetching operations
|
|
5
|
+
* and may need access to fetcher functionality.
|
|
6
|
+
*/
|
|
7
|
+
export interface FetcherCapable {
|
|
8
|
+
/**
|
|
9
|
+
* Optional fetcher property that can be either a string identifier or a Fetcher instance.
|
|
10
|
+
* When present, this property indicates the fetcher associated with the implementing object.
|
|
11
|
+
*/
|
|
12
|
+
fetcher?: string | Fetcher;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Gets a Fetcher instance based on the provided fetcher parameter.
|
|
16
|
+
*
|
|
17
|
+
* @param fetcher - A string identifier or Fetcher instance to resolve
|
|
18
|
+
* @param defaultFetcher - The default Fetcher to use when fetcher is not provided, defaults to defaultNamedFetcher
|
|
19
|
+
* @returns A Fetcher instance if found, otherwise returns the default Fetcher
|
|
20
|
+
*/
|
|
21
|
+
export declare function getFetcher(fetcher?: string | Fetcher, defaultFetcher?: Fetcher): Fetcher;
|
|
22
|
+
//# sourceMappingURL=fetcherCapable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetcherCapable.d.ts","sourceRoot":"","sources":["../src/fetcherCapable.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,CAWxF"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,6BAA6B,CAAC"}
|