TypeScript @angular-core-src-di-reflective_key.KeyRegistry类(方法)实例源码

下面列出了TypeScript @angular-core-src-di-reflective_key.KeyRegistry 类(方法)源码代码实例,从而了解它的用法。

作者:0xJoK    项目:angula   
describe("key", function() {
    var registry: KeyRegistry;

    beforeEach(function() { registry = new KeyRegistry(); });

    it('should be equal to another key if type is the same',
       function() { expect(registry.get('car')).toBe(registry.get('car')); });

    it('should not be equal to another key if types are different',
       function() { expect(registry.get('car')).not.toBe(registry.get('porsche')); });

    it('should return the passed in key',
       function() { expect(registry.get(registry.get('car'))).toBe(registry.get('car')); });

  });

作者:0xJoK    项目:angula   
function() { expect(registry.get(registry.get('car'))).toBe(registry.get('car')); });


问题


面经


文章

微信
公众号

扫码关注公众号