I think all you need to modify here is the case. As it is, it is looking for a JavaScript function Amplify.Request.Define, rather than amplify.request.define. If you change the names passed to Class and Static [] to lowercase, then it will generate the correct JavaScript code. WIG will still capitalize the F# version of those names so the user code would be unchanged.

By on 8/8/2016 12:21 PM ()

Thanks for reply. But it is not about the lower case (btw, I have fixed that). I can type "Amplify.Request.Define" with intellisense support etc., but when I pass the required params then I suddenly got a compilation error - "The field, constructor or member 'Define' is not defined". please check the image attached: http://imgur.com/a/i8pLx

By on 8/9/2016 11:12 AM ()

I think that the problem is about that I have got a class named 'request' and also a static methods with the same name.

By on 8/9/2016 11:19 AM ()

problem solved

1
2
3
4
5
6
7
8
9
10
11
12
    let Request =
        Class "amplify.request"
        |+> Static [
                "define" => ( T<string>?resourceId * RequestType?requestType * T<JQuery.AjaxSettings>?settings ^-> T<unit> )
            ]

    let Amplify = 
        Class "amplify"
        |+> Static [
                "request" => (RequestSettings?settings ^-> T<unit>)
                "request" => (T<string>?resourceId * T<Object<string>>?data * (T<obj> ^-> T<unit>)?callback ^-> T<unit>)
            ]
  • im not using class nesting and I used fully qualified name "amplify.request"
By on 8/9/2016 11:30 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper