Javascript'te, bu hata ne zaman atılır?Bu hata ne anlama geliyor - Atanmamış TypeError: Zaten okuyor musunuz?
index.js
/**
* Created by tushar.mathur on 24/12/15.
*/
'use strict'
const _ = require('lodash')
const Rx = require('rx')
const createDataStore = require('./src/createDataStore')
const fetch = x => Rx.Observable.fromPromise(window.fetch(x))
const parseJSON = x => Rx.Observable.fromPromise(x.json()) // Line: 11 (Where the exception is thrown)
var create = _.partial(createDataStore, fetch, parseJSON)
module.exports = {
create,
// Alias for legacy purposes
createDataStore: create,
createFetchStore: create
}
bir yerli vaadi hatası mı? Neyi ima ediyor? Google hiçbir sonuç bulunamadı.
Sadece bu hatayı alıyorum. Sözü iki kere çözmenize gerek yok, bu da vaatin iç özellikleriyle uğraşmadan imkansız olmalı. Sadece iki kere '.then()' demek zorundasınız. '.then()' i çağırmanın iki kez desteklendiği belgelenmiştir. En ufak bir örneği kaybolabileceğimi göreceğim. Bunu gösteren kodum şurada: https://tonicdev.com/hippietrail/57611741f056621300ecd1e2 – hippietrail