Chrome์์ ์คํ ์์ฑ์ ์ฌ์ ์ํด์ผํ๋๋ฐ์ด ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
if ('scrollRestoration' in history) {
history.scrollRestoration = 'manual'; // type error
}
http://stackoverflow.com/questions/18083389/ignore-typescript-errors-property-does-not-exist-on-value-of-type ์์ ๋ต๋ณ์ ์ฐพ์์ต๋๋ค
(history as any).scrollRestoration = 'manual';
vs
history['scrollRestoration'] = 'manual';
TypeScript์ ๋ฌธ์ / ์ฌ์ธต ๋ถ์ ์ฑ ์ ๋๊ดํธ ๊ตฌ๋ฌธ์ ๋ํด ์ธ๊ธํ์ง ์๋ ๊ฒ ๊ฐ์ต๋๋ค.
๋๋ ์ฒซ ๋ฒ์งธ๋ก ๊ฐ ๊ฒ์
๋๋ค. ๋ ๋ฒ์งธ ๋ฐฉ๋ฒ์ ์๋ํ์ง๋ง -noImplicitAny
์์ด ์ปดํ์ผํ๋ ๊ฒฝ์ฐ์๋ง ๊ฐ๋ฅํฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋๋ ์ฒซ ๋ฒ์งธ๋ก ๊ฐ ๊ฒ์ ๋๋ค. ๋ ๋ฒ์งธ ๋ฐฉ๋ฒ์ ์๋ํ์ง๋ง
-noImplicitAny
์์ด ์ปดํ์ผํ๋ ๊ฒฝ์ฐ์๋ง ๊ฐ๋ฅํฉ๋๋ค.