From 7b73d44e7cd4f1845db318e3e06e29d1aac2638c Mon Sep 17 00:00:00 2001 From: Matt Phillips Date: Sat, 29 Sep 2018 12:22:10 +0100 Subject: [PATCH] Add missing flow types/copyright --- .../jest-util/src/__tests__/error_with_stack.test.js | 7 +++++++ packages/jest-util/src/error_with_stack.js | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/jest-util/src/__tests__/error_with_stack.test.js b/packages/jest-util/src/__tests__/error_with_stack.test.js index d844c1ff1a68..1cffe3ca4a60 100644 --- a/packages/jest-util/src/__tests__/error_with_stack.test.js +++ b/packages/jest-util/src/__tests__/error_with_stack.test.js @@ -1,3 +1,10 @@ +/** + * Copyright (c) 2018-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import ErrorWithStack from '../error_with_stack'; describe('ErrorWithStack', () => { diff --git a/packages/jest-util/src/error_with_stack.js b/packages/jest-util/src/error_with_stack.js index 7bf67278f629..e404f8ab5c96 100644 --- a/packages/jest-util/src/error_with_stack.js +++ b/packages/jest-util/src/error_with_stack.js @@ -1,5 +1,14 @@ +/** + * Copyright (c) 2018-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + export default class ErrorWithStack extends Error { - constructor(message, callsite) { + constructor(message: string, callsite: Function) { super(message); if (Error.captureStackTrace) { Error.captureStackTrace(this, callsite);