Skip to content

Instantly share code, notes, and snippets.

View sajeetharan's full-sized avatar
Debugging "Object reference not set to an instance of an object." 😬

Sajeetharan sajeetharan

Debugging "Object reference not set to an instance of an object." 😬
View GitHub Profile
laughinghan / Every possible TypeScript
Last active May 8, 2024 11:14
Diagram of every possible TypeScript type

Hasse diagram of every possible TypeScript type

  • any: magic, ill-behaved type that acts like a combination of never (the proper [bottom type]) and unknown (the proper [top type])
    • Anything except never is assignable to any, and any is assignable to anything at all.
    • Identities: any & AnyTypeExpression = any, any | AnyTypeExpression = any
    • Key TypeScript feature that allows for [gradual typing].
  • unknown: proper, well-behaved [top type]
    • Anything at all is assignable to unknown. unknown is only assignable to itself (unknown) and any.
    • Identities: unknown & AnyTypeExpression = AnyTypeExpression, unknown | AnyTypeExpression = unknown
  • Prefer over any whenever possible. Anywhere in well-typed code you're tempted to use any, you probably want unknown.
notthetup /
Last active October 29, 2017 04:48
Public Speaking Resources

Online Resources on Public Speaking

nberardi / GuidGenerator.cs
Created September 21, 2012 04:21
TimeUUID Generator for .NET
using System;
namespace FluentCassandra
/// <summary>
/// Used for generating UUID based on RFC 4122.
/// </summary>
/// <seealso href="">RFC 4122 - A Universally Unique IDentifier (UUID) URN Namespace</seealso>
public static partial class GuidGenerator