forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): ensure code snippets in aws-lambda README compile (aws#1…
…4753) Update README in aws-lambda package to pass strict Rosetta compilation, ie., all the Typescript snippets in the README compile successfully. Also follows convention for unscoped usage of all local names (anything from the aws-lambda package) and scoped usage of all other names. In particular: - removes many `lambda.` qualifiers - creates a "default" fixture with a stack already created (accessible as `this`) and lots of names from the package already supported - creates a "function" fixture that includes an already-built function (accessible as `fn`) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
1 parent
89e935b
commit 24b02d5
Showing
3 changed files
with
132 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Fixture with packages imported, but nothing else | ||
import * as path from 'path'; | ||
import { Construct, Stack } from '@aws-cdk/core'; | ||
import { Alias, Code, CodeSigningConfig, DockerImageCode, DockerImageFunction, FileSystem, Function, LayerVersion, Runtime, Tracing } from '@aws-cdk/aws-lambda'; | ||
|
||
class Fixture extends Stack { | ||
constructor(scope: Construct, id: string) { | ||
super(scope, id); | ||
|
||
/// here | ||
} | ||
} |
Oops, something went wrong.