RCTJSStackFrame.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <Foundation/Foundation.h>
  8. @interface RCTJSStackFrame : NSObject
  9. @property (nonatomic, copy, readonly) NSString *methodName;
  10. @property (nonatomic, copy, readonly) NSString *file;
  11. @property (nonatomic, readonly) NSInteger lineNumber;
  12. @property (nonatomic, readonly) NSInteger column;
  13. @property (nonatomic, readonly) NSInteger collapse;
  14. - (instancetype)initWithMethodName:(NSString *)methodName
  15. file:(NSString *)file
  16. lineNumber:(NSInteger)lineNumber
  17. column:(NSInteger)column
  18. collapse:(NSInteger)collapse;
  19. - (NSDictionary *)toDictionary;
  20. + (instancetype)stackFrameWithLine:(NSString *)line;
  21. + (instancetype)stackFrameWithDictionary:(NSDictionary *)dict;
  22. + (NSArray<RCTJSStackFrame *> *)stackFramesWithLines:(NSString *)lines;
  23. + (NSArray<RCTJSStackFrame *> *)stackFramesWithDictionaries:(NSArray<NSDictionary *> *)dicts;
  24. @end