From 8ec91dacc1d2f35e1e3f5d40b5d428eca6e4a8ac Mon Sep 17 00:00:00 2001 From: garronej Date: Sun, 16 Oct 2022 20:40:52 +0200 Subject: [PATCH] Add import instruction for Deno --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index cfe92d05..48e848ee 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,13 @@ Via yarn yarn add ts-pattern ``` +The Deno distribution of the module is published as [ts_pattern](https://deno.land/x/ts_pattern) on `deno.land/x` + +```typescript +import { match, P } from 'https://deno.land/x/ts_pattern@v/mod.ts'; +``` +Replace `` by [the latest version](https://github.com/gvergnaud/ts-pattern/tags). + ### Compatibility with different TypeScript versions Note: TS-Pattern assumes [Strict Mode](https://www.typescriptlang.org/tsconfig#strict) is enabled in your `tsconfig.json` file.