hashrock / deno-opn

Opens stuff like websites, files, executables. Cross-platform, for Deno.

Home Page:https://doc.deno.land/https/raw.githubusercontent.com/hashrock/deno-opn/master/opn.ts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doesn't work on deno/linux

mash-graz opened this issue · comments

if i start the most simple example utilizing your code by deno 0.35.0 on debian linux;

import { opn } from 'https://denopkg.com/hashrock/deno-opn/opn.ts';
opn('https://example.com');

i'll only get this error reports:

error TS2339: Property 'platform' does not exist on type 'typeof Deno'.

► https://raw.githubusercontent.com/hashrock/deno-opn/master/opn.ts:1:14

1 const { run, platform } = Deno;
               ~~~~~~~~

error TS2532: Object is possibly 'undefined'.

► https://raw.githubusercontent.com/hashrock/deno-opn/master/opn.ts:34:19

34   const appArgs = optsWithDefault.app.slice(1);
                     ~~~~~~~~~~~~~~~~~~~

error TS2532: Object is possibly 'undefined'.

► https://raw.githubusercontent.com/hashrock/deno-opn/master/opn.ts:35:39

35   const openApp: string | undefined = optsWithDefault.app[0];
                                         ~~~~~~~~~~~~~~~~~~~


Found 3 errors.

thanks!