mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
Add property "authorization" to the MetaConfig interface
This property isn't properly documented (https://github.com/systemjs/systemjs/blob/master/docs/config-api.md#meta), but the implementation can be found here: *96f9ec1edf/src/fetch.js (L26)*96f9ec1edf/src/fetch.js (L83)
This commit is contained in:
6
types/systemjs/index.d.ts
vendored
6
types/systemjs/index.d.ts
vendored
@@ -111,6 +111,12 @@ declare namespace SystemJSLoader {
|
||||
* Use with the SystemJS Builder. (https://github.com/systemjs/builder#ignore-resources)
|
||||
*/
|
||||
build?: boolean;
|
||||
|
||||
/**
|
||||
* A truthy value enables sending credentials to the server on every request. Additionally, a string value adds
|
||||
* an "Authorization" header with that value to all requests.
|
||||
*/
|
||||
authorization?: string | boolean;
|
||||
}
|
||||
|
||||
interface PackageConfig {
|
||||
|
||||
@@ -22,6 +22,22 @@ SystemJS.config({
|
||||
}
|
||||
});
|
||||
|
||||
SystemJS.config({
|
||||
meta: {
|
||||
'*': {
|
||||
authorization: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
SystemJS.config({
|
||||
meta: {
|
||||
'*': {
|
||||
authorization: 'Basic YWxhZGRpbjpvcGVuc2VzYW1l'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
SystemJS.config({
|
||||
map: {
|
||||
'local/package': {
|
||||
|
||||
Reference in New Issue
Block a user