Skip to content

Commit

Permalink
fix: fix renderer in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 8, 2020
1 parent 1a983a5 commit 8077adb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ and use it inside your package like this:
```js
import type {MarkdownService} from "atom-ide-base"

let renderer: MarkdownService["renderer"]
let render: MarkdownService["render"]

/**
* retrieves a reference to the markdown rendering service that should be used
* @param {MarkdownService} markdownService the service for rendering markdown text
*/
export function consumeMarkdownRenderer(markdownService: MarkdownService) {
renderer = markdownService.render
render = markdownService.render
}
```

`renderer` is a function with this type:
`render` is a function with this type:

```js
let renderer: (markdownText: string, grammar: string) => Promise<string>
let render: (markdownText: string, grammar: string) => Promise<string>
```

### Developer Usage - as npm package - ES6 modules
Expand All @@ -51,10 +51,10 @@ npm install --save atom-ide-markdown-service
and use it inside your package like this:

```js
import { render as renderer } from "atom-ide-markdown-service/lib/renderer"
import { render } from "atom-ide-markdown-service/modules/renderer"
```

in which renderer is a function with this type `renderer(markdownText: string, grammar: string) => Promise<string>`
in which renderer is a function with this type `render(markdownText: string, grammar: string) => Promise<string>`

### Developer Usage - as npm package - commonjs

Expand Down

0 comments on commit 8077adb

Please sign in to comment.