You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be really nice to just copy paste a link in order to share a code snippet online. No need for any backend storage as you can just do the same as the TypeScript playground: store the code after the hash in the URL. And the share button just copy pastes that URL.
It would be really nice to just copy paste a link in order to share a code snippet online. No need for any backend storage as you can just do the same as the TypeScript playground: store the code after the hash in the URL. And the share button just copy pastes that URL.
Example TypeScript playground URL containing code: https://www.typescriptlang.org/play/?#code/GYVwdgxgLglg9mABMGAjAFGAXIsIC2qApgE4CUiA3gFCKIA2RUiA2gIYA0iqAuogLysADFwCMPANy1EAdwAWMRokwBaFRXZdeA1qi5tEAam6TpJJiBJI2UgL7VqAekeIAiiBgQA1oihEAzlD+WNQQCP5wjAB09HAA5ugoGEJkZBJ0zohCoeGRRDHxiWjooqnpiJmiOWAR0bEJSSUpaRUuAKxt1EA
The TypeScript playground uses lzstring specifically to produce a shorter URL: https://github.com/microsoft/TypeScript-website/blob/1e7ea49f60953aa446b591c6aff347a7c566e3cb/packages/sandbox/src/compilerOptions.ts#L84-L152