1
0
mirror of synced 2025-12-22 11:26:57 -05:00
Files
docs/components/playground/types.ts
Mike Surowiec 06d8f81401 Two-pane Experiment (#21092)
* pull changes from docs-playground

* cleanup, add callout banner

* cleanup linting and test fixes

* add discussion link

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-08-26 14:19:40 -04:00

34 lines
731 B
TypeScript

export interface CodeBlockRef {
id: string
highlight?: Array<[number, number]> | number | [number, number]
}
export interface ContentBlock {
title?: string
type: 'default' | 'sub-section' | 'sub-section-2'
content: string
codeBlock: CodeBlockRef
}
export interface CodeBlock {
fileName: string
language: string
code: string
}
export interface PlaygroundArticleT {
title: string
shortTitle: string
topics: Array<string>
intro: string
slug: string
originalArticle: string
type: 'tutorial'
prerequisites?: string
codeLanguageId: string
contentBlocks: Array<ContentBlock>
codeBlocks: Record<string, CodeBlock | Array<CodeBlock>>
}
export interface CodeLanguage {
id: string
label: string
}