Skip to content

Instantly share code, notes, and snippets.

View xeladotbe's full-sized avatar

Alexander Martin xeladotbe

View GitHub Profile
@xeladotbe
xeladotbe / yamlCompletion.ts
Created July 2, 2023 10:36 — forked from toonvanstrijp/yamlCompletion.ts
yaml-server json7 autocomplete
/*---------------------------------------------------------------------------------------------
* Copyright (c) Red Hat, Inc. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as Parser from '../parser/jsonParser07';
import { parse as parseYAML } from '../parser/yamlParser07';
import * as Json from 'jsonc-parser';
@xeladotbe
xeladotbe / Box.tsx
Created November 27, 2022 19:48 — forked from kripod/Box.tsx
Polymorphic `as` prop for React components with TypeScript
import React from 'react';
// Source: https://github.com/emotion-js/emotion/blob/master/packages/styled-base/types/helper.d.ts
type PropsOf<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
E extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>
> = JSX.LibraryManagedAttributes<E, React.ComponentPropsWithRef<E>>;
export interface BoxOwnProps<E extends React.ElementType = React.ElementType> {
as?: E;
{
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>Watch as I move this plane based on your position!</speak>"
},
"directives": [
{
"type": "Alexa.Presentation.APL.RenderDocument",
"document": {
"type": "APL",