/ Check-in [751f1ba760]
DEMO | DOWNLOAD | DEPLOY | SEARCH
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix link
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:751f1ba760d70084141763f738964b84b714a809
User & Date: pmacdona 2019-06-22 16:31:33
Context
2019-06-25
14:44
Support "[].constructor === Array" check-in: 4aa79ad664 user: pmacdona tags: trunk
2019-06-22
16:31
Fix link check-in: 751f1ba760 user: pmacdona tags: trunk
16:27
Rename to jsi.jsi check-in: 66c6bda839 user: pmacdona tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added js-demos/jsig.html.



































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Typed Function Arguments demo.
<p>
See warnings in console <i>(F12, Ctrl-Shift-I or Inspect-Element)</i>

<script src="../lib/web/jsi.js"></script>
<script>
    $jsi.include('bark.jsi');
    $jsi.onload(function () {
        bark('abc',0);
        bark(9,0);
        bark('9','0');
        bark(9);
        bark(9,0,0);
    });
    
</script>

Changes to md/jsi.js.md.

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41


42
43
44
45
46
47
48
            bark('9','0');
            bark(9);
            bark(9,0,0);
        });
        
    </script>

outputting to the console:

    BARK: abc
    jsi.js:23 type mismatch for arg 1 "s" expected "string" got "number" 9: calling bark(s:string, n:number)
    BARK: 9
    jsi.js:23 type mismatch for arg 2 "n" expected "number" got "string" 0: calling bark(s:string, n:number)
    BARK: 9
    jsi.js:23 missing arguments: expected 2 got 1: calling bark(s:string, n:number)
    BARK: 9
    jsi.js:23 extra arguments: expected 2 got 3: calling bark(s:string, n:number)
    BARK: 9



Manual
----

    <script src="/jsi/web/jsi.js"></script>
    <script>
    function bark(s, n) { $jsig('bark(s:string, n:number)');







|










>
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
            bark('9','0');
            bark(9);
            bark(9,0,0);
        });
        
    </script>

which outputs to the console:

    BARK: abc
    jsi.js:23 type mismatch for arg 1 "s" expected "string" got "number" 9: calling bark(s:string, n:number)
    BARK: 9
    jsi.js:23 type mismatch for arg 2 "n" expected "number" got "string" 0: calling bark(s:string, n:number)
    BARK: 9
    jsi.js:23 missing arguments: expected 2 got 1: calling bark(s:string, n:number)
    BARK: 9
    jsi.js:23 extra arguments: expected 2 got 3: calling bark(s:string, n:number)
    BARK: 9
    
Click [here](../js-demos/jsig.html).

Manual
----

    <script src="/jsi/web/jsi.js"></script>
    <script>
    function bark(s, n) { $jsig('bark(s:string, n:number)');