Amazon CloudWatch Synthetics Type Support for syn-nodejs-* runtime
npm install @aws/synthetics-coreTypeScript type definitions for the Amazon CloudWatch Synthetics Node.js runtime library.
Please ensure the type definition package version matches your canary's runtime version.
``bash`
npm install @aws/synthetics-core
`typescript
import { synthetics } from '@aws/synthetics-core';
// Execute a step with custom configuration
await synthetics.executeStep('checkHomepage', async () => {
// Your test logic here
}, {
includeRequestHeaders: true,
includeResponseHeaders: true,
restrictedHeaders: ['authorization'],
includeRequestBody: true,
includeResponseBody: true
});
``
This package provides complete TypeScript type definitions for the Amazon CloudWatch Synthetics Node.js runtime, enabling full IntelliSense support and type checking in your canary scripts.
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.