r. clayton
r. clayton

Reputation: 107

js.dart scoped() undefined

I am trying to get this test program

import "package:js/js.dart" as js;

main() {
  js.scoped();
  js.retain();
  js.hasProperty();
  js.map();
  js.array();
}

to compile, but the dart editor (1.1.0.dev_04_00) is flagging scoped() and retain() as undefined, which is contrary to what I'm told by the js.dart documentation. The other three functions (hasProperty(), map(), and array()) are not flagged as undefined (and are flagged as being used incorrectly), so I'm assuming the problem is not that the editor doesn't know about js.dart, or that the editor and the package are somehow out of sync. What is the explanation for this problem?

Upvotes: 3

Views: 104

Answers (1)

Alexandre Ardhuin
Alexandre Ardhuin

Reputation: 76333

The documentation of the js package is outdated. scoped has been deprecated in 0.0.26 and removed in 0.1.0.

EDIT : The documentation has been updated.

Upvotes: 1

Related Questions