Coder Social home page Coder Social logo

Comments (9)

ALuhning avatar ALuhning commented on June 14, 2024 1

restarting the typescript server didn't fix it; however, it does compile and js file created doesn't seem to have any issue finding it - must be a VS Code issue. Thanks.

from near-sdk-as.

willemneal avatar willemneal commented on June 14, 2024 1

Ah I forgot to publish after the isValidAccountID update. If you update to v1.1.0, it should be there.

from near-sdk-as.

ALuhning avatar ALuhning commented on June 14, 2024 1

Yes it is. Thank you very much.

from near-sdk-as.

willemneal avatar willemneal commented on June 14, 2024

Hmm, well the other functions in that file call globals declared in another file. This way only the functions that are used will trigger the import required. Thus there are inlined as to ensure that there is no indirection when compiled. However, other functions should be inlined only if the optimizer wants it to be.

Can you post your current setup? Are you using version 1.0.0?

from near-sdk-as.

ALuhning avatar ALuhning commented on June 14, 2024

I am using near-sdk-as ver 1.0.1.

import { Context, u128, env } from 'near-sdk-as'

and in an function I'm trying to do:
assert(env.isValidAccountID(escrow_account_id), ERR_INVALID_ACCOUNT_ID)

from near-sdk-as.

willemneal avatar willemneal commented on June 14, 2024

Hmm, one thing to try when VSCode is made about codes is to restart the TS lang server, F1 and then type restart typescript.

Are you able to compile the file outside of VSCode? If not, what compile errors are you getting?

from near-sdk-as.

ALuhning avatar ALuhning commented on June 14, 2024

I spoke too soon - not sure what I was doing earlier when I check the compilation, but it is failing with following error code:

ERROR TS2339: Property 'isValidAccountID' does not exist on type '~lib/near-sdk-as/sdk/env/env/env'.

assert(env.isValidAccountID(new_owner_id), ERR_INVALID_ACCOUNT_ID);
~~~~~~~~~~~~~~~~
in assembly/main.ts(73,14)

from near-sdk-as.

willemneal avatar willemneal commented on June 14, 2024

Is it possible to share the project? If not, can you inspect node_modules/near-sdks-as/assembly/sdk/env/env.ts for the function?

And does the version number in the package.json also agree with 1.0.1?

from near-sdk-as.

ALuhning avatar ALuhning commented on June 14, 2024

The function isn't in that env.ts file. I just blew away the node_modules folder and cache and reinstalled and rechecked to see if it would show up - still not there. Yes, package number says 1.0.1. Also did a npm list near-sdk-as to confirm 1.0.1 is being used.

Pushed it all to a repository (incl node_modules) - https://github.com/ALuhning/VPC-FT

from near-sdk-as.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.