target
tells TS what type of JS to generate, fores5
for conversion is required (for example let/const -> var, class -> function + prototype, etc.), whereases6
can just leave the original code as is (after removing type information).types
tells TS about what types exists and what their API is. When usinglib
you are asking TS to add known core types that it already has definitions for, without having to add those yourself (for example,@types/core-js
). When youimport
you adding more types that TS knows about. Additionally, you can use thetypes
configuration property to add global types.polyfills
are required at runtime to ensure that older browsers can use the constructs (such as Promise) that exist natively in modern browsers. At this point, TS is not involved at all.
This file contains hidden or 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
using System; | |
[AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)] | |
sealed class LoggerAttribute<T> : Attribute | |
{ | |
readonly Func<T, string> _template; | |
public LoggerAttribute(Func<T, string> positionalString) | |
{ | |
_template = positionalString; | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>cheer</Title> | |
<Shortcut>cheer</Shortcut> | |
<Description>Code snippet for cheers during a live stream</Description> | |
<Author>Mordechai Zuber</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
This file contains hidden or 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
using System; | |
using System.Threading.Tasks; | |
namespace Example | |
{ | |
internal class Program | |
{ | |
private static void Main() | |
{ | |
var t1 = (f: new Foo { A = 1 }, b: new Bar { B = 2 }); |
This file contains hidden or 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
interface FilterOption { | |
key: string | number; | |
displayValue: string; | |
predicate: <TEntity>(e: TEntity) => boolean; | |
} | |
interface Registration { | |
id: number; | |
name: string; | |
date: string; |
This file contains hidden or 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
public class Foo | |
{ | |
public OtherClass GetThing(params object[] stuff) => new OtherClass(stuff); | |
public void DoThing() | |
{ | |
var first = GetThing(..); | |
// This was reported as having type `dynamic` | |
var second = GetThing(..); | |
} |
I hereby claim:
- I am M-Zuber on github.
- I am mordzuber (https://keybase.io/mordzuber) on keybase.
- I have a public key whose fingerprint is 6288 6DCE 6286 2CFC 772B 0B9E F0AA 364E A4D6 F64B
To claim this, I am signing this object:
As per the API documentation the RepositoryRequest class is missing some options.
The options missing are visibility
and affiliation
.
Read this to get setup for contributing
Steps to implement:
- Add the following
enum
s - Visibility:
- Public
- Private