Skip to content

Commit

Permalink
docs: fix import path
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Dropped support for node < 18.
  • Loading branch information
bostrom committed Oct 1, 2024
1 parent 02cac1f commit a428a42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ Each extension will receive the canvas returned by the previous extension. The c
The following example extension draws a border around the image 5px from the edge using the configured text color.

```typescript
import { generate, ComputedOptions } from 'text-to-image';
// All types from 'node-canvas' are re-exported for convenience
import { Canvas } from 'text-to-image/extensions';
import { Canvas, ComputedOptions, generate } from 'text-to-image';

const makeBorder = (canvas: Canvas, conf: ComputedOptions) => {
const { width, height } = canvas;
Expand Down

0 comments on commit a428a42

Please sign in to comment.