Skip to content

Instantly share code, notes, and snippets.

View andreasrs's full-sized avatar

Andreas Rudi Søvik andreasrs

  • Oslo, Norway
View GitHub Profile
it('has valid type-definition for dynamic data: Owners', () => {
OwnersChecker.check(ownersData);
});
import { createCheckers } from 'ts-interface-checker';
import typesRuntime from './types-ti';
import { Owners } from './types';
const { Owners: OwnersChecker } = createCheckers(typesRuntime);
export const isOwner = function(data: any): data is Owners {
return OwnersChecker.validate(data) === null;
}

Keybase proof

I hereby claim:

  • I am andreasrs on github.
  • I am arsovik (https://keybase.io/arsovik) on keybase.
  • I have a public key ASDvoPS_yvXxgP9wu1p4MiB85ScN5Ph4fedTns7FhlXg0Qo

To claim this, I am signing this object:

@andreasrs
andreasrs / split.js
Created October 20, 2017 12:22
Example on approach for bundle split routes
// FILE: routes.js
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import Split from './screens/split';
import App from './screens';
import Start from './screens/start';
// "Split" is a part of the main bundle, but it renders a component from a separately loaded bundle on demand
export default () => (
@andreasrs
andreasrs / keybase.md
Created April 23, 2014 10:04
keybase.md

Keybase proof

I hereby claim:

  • I am andreasrs on github.
  • I am arsovik (https://keybase.io/arsovik) on keybase.
  • I have a public key whose fingerprint is 9441 A939 B9CB 2F02 4817 B6CD 33E4 D892 7236 5F64

To claim this, I am signing this object: