This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.nabeix.javascriptinterfacetest; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.webkit.JavascriptInterface; | |
import android.webkit.WebView; | |
public class MainActivity extends AppCompatActivity { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class A<T1, T2> { | |
} | |
class B extends A<string, number> { | |
} | |
interface AClassStatic<T1, T2, T3 extends A<T1, T2>> { | |
new (): T3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// BAD | |
class A extends Array { | |
constructor(array: number[]) { | |
super(); | |
console.log(array); // called twice with other array 1st => [1, 2, 3], 2nd(not an array type) => 3 | |
array.forEach((a, i) => this[i] = a); // => Uncaught TypeError: array.forEach is not a function | |
} | |
} | |
const a = new A([1,2,3]); |