-
I'd like to suggest a feature for allowing custom handlers within template literals, if it's possible. I haven't looked through the source so I'm not sure - but I believe something similar is already …
ryall updated
6 years ago
-
**Prettier 1.11.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAzCFMC8mABvBpgCTACMA1NQL7EDcAOlJFOQEYCGAToRJksAJmLsQAGhAQADjACW6ZKAH8IAdwAKAhGmQheANwiKAJtKMZk2XgBs0cGd36…
-
**TypeScript Version:** 2.3.4
**Code**
```ts
const obj = {
type: 'literal'
}
const type = 'literal'
const type2 = obj.type
const type3 = obj.type as 'literal'
// error: Arg…
-
**TypeScript Version:** Version 2.2.0-dev.20161209
**Code**
```ts
type StringLiteral = 'a' | 'b';
// ok
const literalTypedArray0: StringLiteral[] = [
'foo',
'a',
] as String…
-
**TypeScript Version:** 2.4.2
**Code**
```ts
type A = { a: number, b: string };
const a: A = { a: 1, b: 'foo' };
const b: A = { ...a, b: 123 }; // doesn't type check, b should be…
-
**TypeScript Version:** 2.4.0
**Code**
```ts
interface ITest {
optional?: string;
}
function test(param: ITest): void {
}
class Test {
}
test({ whatever: 0, option…
-
**TypeScript Version:** 2.4.1
**Code** works fine, as expected:
```ts
if (this._callbacks['ready']) {
this._callbacks['ready']()
}
```
but it error linting by…
oklas updated
6 years ago
-
I'm an `ember` user, which uses tagged template strings for component testing. Normally, you'd write something that looks like:
```javascript
this.render(hbs`
Some stuff here
{{some-handleb…
-
I'd like to suggest a feature, if possible. When working with [styled-components](https://github.com/styled-components/styled-components), you often find yourself writing things like `${props => props…
-
**TypeScript Version:** nightly (2.1.0-dev.20160818)
**Code**
I lifted this from Anders's final example in https://github.com/Microsoft/TypeScript/pull/9407#issue-162831239.
``` ts
type Resul…