By using ReturnType we don't have to manually write type for Context
See also gist for SolidJS https://gist.github.com/JLarky/a46055f673a2cb021db1a34449e3be07
And original tweet https://twitter.com/JLarky/status/1554152932425117697
By using ReturnType we don't have to manually write type for Context
See also gist for SolidJS https://gist.github.com/JLarky/a46055f673a2cb021db1a34449e3be07
And original tweet https://twitter.com/JLarky/status/1554152932425117697
| import Amplify from 'aws-amplify'; | |
| const { AppsyncCdkAppStack } = require('./outputs.json'); | |
| import config from './aws-exports'; | |
| Amplify.configure({ | |
| ...config, | |
| aws_appsync_graphqlEndpoint: AppsyncCdkAppStack.GraphQLAPIURL, | |
| aws_appsync_apiKey: AppsyncCdkAppStack.GraphQLAPIKey | |
| }) |
| { | |
| "Comment": "A Hello World example of the Amazon States Language using Pass states", | |
| "StartAt": "Create pending order", | |
| "States": { | |
| "Create pending order": { | |
| "Type": "Pass", | |
| "Next": "Select Payment Method" | |
| }, | |
| "Select Payment Method": { | |
| "Type": "Choice", |
| export default function createCrudHooks({ | |
| baseKey, | |
| indexFn, | |
| singleFn, | |
| createFn, | |
| updateFn, | |
| deleteFn, | |
| }) { | |
| const useIndex = (config) => useQuery([baseKey], indexFn, config) | |
| const useSingle = (id, config) => |
There are two 'types' to be aware of with a quickfix window:
:grep foo will show a specific line that matched within a file).To replace content using vim (via the quickfix window) you need to choose whether you want to apply the change via the quickfix 'entry' or via the 'file' as a whole.
If you use cdo, then your 'action' (i.e. how you're going to replace content) will be applied to every entry in the quickfix window.
If you use cfdo, then your action will be applied to each file in the quickfix window.
Free to read online: exploringjs.com/impatient-js/
esm package.String.prototype.replaceAll()Promise.any()_) as separators in number literals and bigint literals| # create table topics! | |
| create table topics ( | |
| id int primary key auto_increment, | |
| name varchar(256), | |
| parent_id int null, | |
| type smallint not null, | |
| foreign key (parent_id) references topics(id), | |
| index(type) | |
| ); |
| // Possible since https://github.com/aws/aws-cdk/pull/17144 | |
| class VpcProduct extends servicecatalog.ProductStack { | |
| vpc: aws_ec2.Vpc; | |
| constructor(scope: Construct, id: string) { | |
| super(scope, id); | |
| this.vpc = new aws_ec2.Vpc(this, 'Vpc', { |
| import { | |
| useForm as useHookForm, | |
| UseFormProps as useHookFormProps, | |
| } from "react-hook-form"; | |
| import { zodResolver } from "@hookform/resolvers/zod"; | |
| import { TypeOf, ZodSchema } from "zod"; | |
| type UseFormProps<Z extends ZodSchema> = Omit< | |
| useHookFormProps<TypeOf<Z>>, | |
| 'resolver' |