mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
[microservice-utilities] Rewrite example file
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
import { Authorizer, PlatformClient, RequestLogger, ServiceTokenProvider } from 'microservice-utilities';
|
||||
|
||||
const authorizer = new Authorizer((msg: any) => msg, {jwkKeyListUrl: 'aaa'});
|
||||
const authorizerPolicy = authorizer.getPolicy({test: true});
|
||||
(async (): Promise<void> => {
|
||||
const authorizer = new Authorizer((msg: any) => msg, { jwkKeyListUrl: 'aaa' });
|
||||
const authorizerPolicy = authorizer.getPolicy({ test: true });
|
||||
|
||||
const platformClient = new PlatformClient((msg: any) => msg);
|
||||
platformClient.get('https://www.typescriptlang.org/');
|
||||
platformClient.post('https://www.typescriptlang.org/', {testData: 'abc'});
|
||||
const platformClient = new PlatformClient((msg: any) => msg);
|
||||
const result = await platformClient.get('https://www.typescriptlang.org/');
|
||||
const data = result.data as string;
|
||||
|
||||
const serviceTokenProvider = new ServiceTokenProvider(platformClient, {});
|
||||
platformClient.post('https://www.typescriptlang.org/', { testData: 'abc' });
|
||||
|
||||
const requestLogger = new RequestLogger({jsonSpace: 4});
|
||||
requestLogger.log('hello world');
|
||||
const serviceTokenProvider = new ServiceTokenProvider(platformClient, {});
|
||||
|
||||
const requestLogger = new RequestLogger({ jsonSpace: 4 });
|
||||
requestLogger.log('hello world');
|
||||
})();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": false,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
|
||||
Reference in New Issue
Block a user