js-yaml-type-ts
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

js-yaml-type-ts

Use it like this:

import {
  createIncludeType,
  createModuleType,
  createFunctionType,
} from 'js-yaml-type-ts'
 
const schema = new yaml.Schema({
  include: [yaml.DEFAULT_SAFE_SCHEMA],
  explicit: [createIncludeType(), createModuleType(), createFunctionType()],
})
const tsModule = yaml.load(
  `
customInclude: !!ts/include "fixtures/include.tsx"
customModule: !!ts/module |
  export default {
    boolean: true,
    func: () => true,
    asyncFunc: async () => true,
  }
customFunction: !!ts/function |
  export default () => {
    return true
  }
`,
  { schema }
)

Package Sidebar

Install

npm i js-yaml-type-ts

Weekly Downloads

2

Version

1.3.1

License

MIT

Unpacked Size

93.5 kB

Total Files

35

Last publish

Collaborators

  • jaulz