fix(aio): fix compilation error by using the correct type for `providers`

This commit is contained in:
Georgios Kalpakas 2017-08-10 03:54:10 +03:00 committed by Hans
parent cea02414b0
commit 4d523fda98
1 changed files with 3 additions and 3 deletions

View File

@ -1,15 +1,15 @@
// #docplaster // #docplaster
// #docregion without-missing-translation // #docregion without-missing-translation
import { TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy } from '@angular/core'; import { TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy, StaticProvider } from '@angular/core';
import { CompilerConfig } from '@angular/compiler'; import { CompilerConfig } from '@angular/compiler';
export function getTranslationProviders(): Promise<Object[]> { export function getTranslationProviders(): Promise<StaticProvider[]> {
// Get the locale id from the global // Get the locale id from the global
const locale = document['locale'] as string; const locale = document['locale'] as string;
// return no providers if fail to get translation file for locale // return no providers if fail to get translation file for locale
const noProviders: Object[] = []; const noProviders: StaticProvider[] = [];
// No locale or U.S. English: no translation providers // No locale or U.S. English: no translation providers
if (!locale || locale === 'en-US') { if (!locale || locale === 'en-US') {