Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

cannot compile typescript examples #69

Open
jopek opened this issue Oct 6, 2018 · 1 comment
Open

cannot compile typescript examples #69

jopek opened this issue Oct 6, 2018 · 1 comment

Comments

@jopek
Copy link

jopek commented Oct 6, 2018

steps to reproduce:

  • git clone https://github.com/staltz/cycle-onionify.git
  • npm i
  • npm run lib
  • cd examples/lenses/
  • npm start

node 8.1.4
npm 6.4.1

alex@alexs-mbp : ~/dev/learn/cyclejs
[0] % git clone https://github.com/staltz/cycle-onionify.git
Cloning into 'cycle-onionify'...
[...]

alex@alexs-mbp : ~/dev/learn/cyclejs
[0] % cd cycle-onionify

alex@alexs-mbp ‹ master › : ~/dev/learn/cyclejs/cycle-onionify
[0] % npm i

> [email protected] install /Users/alex/dev/learn/cyclejs/cycle-onionify/node_modules/fsevents
> node install

[fsevents] Success: "/Users/alex/dev/learn/cyclejs/cycle-onionify/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm notice created a lockfile as package-lock.json. You should commit this file.
added 580 packages from 203 contributors and audited 2610 packages in 20.678s
found 0 vulnerabilities


alex@alexs-mbp ‹ master ● › : ~/dev/learn/cyclejs/cycle-onionify
[0] % npm run lib

> [email protected] prelib /Users/alex/dev/learn/cyclejs/cycle-onionify
> mkdir -p lib


> [email protected] lib /Users/alex/dev/learn/cyclejs/cycle-onionify
> tsc


alex@alexs-mbp ‹ master ● › : ~/dev/learn/cyclejs/cycle-onionify
[0] % cd examples/lenses/

alex@alexs-mbp ‹ master ● › : ~/dev/learn/cyclejs/cycle-onionify/examples/lenses
[0] % l
total 24
-rw-r--r--  1 alex  staff  366 Oct  6 12:17 index.html
-rw-r--r--  1 alex  staff  695 Oct  6 12:17 package.json
drwxr-xr-x  6 alex  staff  204 Oct  6 12:17 src
-rw-r--r--  1 alex  staff  385 Oct  6 12:17 tsconfig.json

alex@alexs-mbp ‹ master ● › : ~/dev/learn/cyclejs/cycle-onionify/examples/lenses
[0] % npm start

> [email protected] start /Users/alex/dev/learn/cyclejs/cycle-onionify/examples/lenses
> npm install && npm run browserify && echo 'OPEN index.html IN YOUR BROWSER'

npm notice created a lockfile as package-lock.json. You should commit this file.
added 160 packages from 194 contributors and audited 1040 packages in 15.377s
found 0 vulnerabilities


> [email protected] prebrowserify /Users/alex/dev/learn/cyclejs/cycle-onionify/examples/lenses
> mkdirp dist && tsc

src/Edit.ts(42,3): error TS2322: Type '{ DOM: MemoryStream<VNode>; onion: Stream<Reducer>; }' is not assignable to type 'Sinks'.
  Types of property 'DOM' are incompatible.
    Type 'MemoryStream<VNode>' is not assignable to type 'Stream<VNode>'.
      Property '_ils' is protected but type 'Stream<T>' is not a class derived from 'Stream<T>'.
src/Item.ts(38,3): error TS2322: Type '{ DOM: MemoryStream<VNode>; onion: Stream<(prevState: State) => State>; }' is not assignable to type 'Sinks'.
  Types of property 'DOM' are incompatible.
    Type 'MemoryStream<VNode>' is not assignable to type 'Stream<VNode>'.
src/main.ts(7,23): error TS2345: Argument of type '(sources: Sources) => Sinks' is not assignable to parameter of type 'MainFn<Sources, OSi<{}>>'.
  Type 'Sinks' is not assignable to type 'OSi<{}>'.
    Types of property 'onion' are incompatible.
      Type 'Stream<Reducer>' is not assignable to type 'Stream<Reducer<{}>>'.
        Property '_ils' is protected but type 'Stream<T>' is not a class derived from 'Stream<T>'.

npm ERR! code ELIFECYCLE
[...]
@fasiha
Copy link

fasiha commented Oct 8, 2018

Possibly related? https://github.com/cyclejs/cyclejs/tree/master/examples/intermediate/bmi-typescript works as is, but attempting to upgrade TypeScript to "2.5" or higher in package.json produces the same error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants